All data on entire site lost after master page template chan

Posted by Community Admin on 03-Aug-2018 00:08

All data on entire site lost after master page template changed

All Replies

Posted by Community Admin on 12-Apr-2011 00:00

Hi,

We have been building a Sitefinity 4.0 site for some time now and have many pages containing content in the various widgets.  This represents many, many hours of work.

All of our pages are based on a Master Page template created using the template builder.

One of our folks edited the master page template doing a major restructuring in such a way that entire sections we're deleted and then recreated before it was re-published.

Of course this ended up "orphaning" all of the content widgets on every single page of our site and now every page is basically empty, our entire content is gone.

So the obvious question is:  How do we get the opphaned widgets from all our pages back to being reassigned to a certain block on the master template page?

I can see from a few other posts from users with the same problem that the answer seems to be we are SOL, since there is no way to see the orphaned widget content or specifically assign the content block IDs.  

I would say that if the template editor allows you to delete content blocks and irreversibly ophan huge amounts of content without warning, than that would be a major design flaw, just imho....

In the event that Telerik figured that nobody would ever want to change their template pages after they were created, and there is no solution, could you maybe tell me what table and field in the database I could find the content of my "Content" widgets...so we could at least brute-force cut and paste to save our data?

Any help would be greatly appreciated...
Scott

Posted by Community Admin on 12-Apr-2011 00:00

I would also agree that if this is possible something must be done asap to fix this...seems like a huge hole, especially if there's no versioning to roll it back

Posted by Community Admin on 15-Apr-2011 00:00

Hi All,

I agree that this behavior might be unexpected sometimes. We are still discussing how to handle it.

In the meantime, if you experience this problem, there is a way to restore the page controls. I wrote some code that does exactly that. I attached it to this post. The code will place the orphaned controls in some existing placeholder. It searches for a "Body" or a "Content" placeholder and puts the orphaned controls there. If such placeholders does not exist, it uses the first available placeholder. Feel free to apply some custom logic when necessary.

In most cases, the controls will not be exactly as you want them after you run the code. You will probably have to move them or delete them or do some other changes. This is why the code works on a draft of a page, not the public version. If a draft for the page does not exist, it will be created.

The archive I attached contains an .aspx file + codebehind. You need to put it somewhere in your web application and access it. The code specifies which page to process. You will need to modify the ID of the page in the code to make it process the page you want. You can also modify it to process all pages, if you need to. If you decide, you can also alter the code so that it displays the IDs of the missing placeholders.



Regards,
Lyubomir Dokov
the Telerik team

Posted by Community Admin on 25-May-2011 00:00

Hello,

We have reports that the latest official update fixed all causes and all works fine. If anyone experiences similar behavior, please try upgrading to the latest version.

Kind regards,
Georgi
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed