A user of a site I made in silverstripe 2.4 inserted text in error, then instead of deleting the text he hit the "delete from draft site" button. This has caused a major problem in that I cannot select the page in question to restore or edit it, and neither can I edit any of another class of page to which it can be convolutedly connected. The page that was deleted from draft site contains a large number of "publication" objects, and the other class of page that has become unselectable has an optional many to many relationship with the publication objects as well. An error comes up when I try to select a page, but it is uninformative. Just a popup with the site url.
Is there a "back door" method to restore pages?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Sounds like an issue with your user permissions.
No reason (at least, immediately obvious) that this action should not work for an admin.
In any case, the method you're looking for is probably: http://api.silverstripe.org/2.4/class-SiteTree.html#_doRestoreToStage
(or perhaps some of the ones above it).
What I ended up doing was creating another page, exporting all the child objects of the original page from the database, doing a find and replace of the parent page ID to the new one, reimporting them, then deleting the old page from SiteTree_live manually. It was scary but it worked.