14 March 2010 at 10:21pm
(Last edited: 22 March 2010 11:57pm),
I have a site (www.successfulspeaking.co.nz) which has been running quite happily on SS 2.0.1 for several years.
Anyway, was just working on some new pages in the CMS when all the the site content disappeared from the tree. All that is showing now is the 'Site Content' icon and 'page not found'. Thankfully, the live site seems to be unaffected (so I assume the db, template, content display functions are all still working).
So, I'm a bit confused as to what happened or how to restore the site - especially as there is nothing in the history tab either.
14 March 2010 at 11:28pm
(Last edited: 14 March 2010 11:29pm),
You might want to consider upgrading to 2.3.6, since 2.0.1 is quite old! 2.4.0 is on the way too, so now could be the time.
Of course, you should upgrade and test locally in your dev environment with the live database first!
A few things to check with the existing site:
* Is the SiteTree table still containing all the data? SiteTree_Live should definitely have everything if the site's still showing pages
* Cross checking the ParentID columns of the pages in the SiteTree and SiteTree_Live - the top level pages should have a ParentID of 0
15 March 2010 at 9:06am
(Last edited: 15 March 2010 9:07am),
That is, and this most likely explains why they don't show up in the CMS. Do the entries in SiteTree_Live have ParentID = 0? You could try backing up SiteTree, then copying the contents of SiteTree_Live into SiteTree. This could be a temporary fix before you decide to upgrade. :-)
22 March 2010 at 11:55pm
I found out what was causing the site to be not displayed in the CMS interface - turned out that the parentid of the home page was set to 31 instead 0. Since 31 in the id of a page in the site, I assume it set up some kind of circular reference which it couldn't resolve.
I was just about to copy sitetree_live into site tree and decided to do one final check of the data in those tables. When I found the problem, I took a backup and just overwrote the parentid of home page with 0 and the site was "magically" restored! Not sure how that could've happened, but I guess it may have been a stray click. Can the parentid of a page be set through the GUI?
Anyway, thanks for the suggestions. If nothing else, it has added to my knowledge of Silverstripe! ;-)