Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Cannot select page to restore


Go to End


3 Posts   791 Views

Avatar
Bronwyn

Community Member, 22 Posts

10 April 2015 at 10:42am

Edited: 10/04/2015 10:44am

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?

Avatar
Pyromanik

Community Member, 419 Posts

11 April 2015 at 1:01am

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).

Avatar
Bronwyn

Community Member, 22 Posts

11 April 2015 at 2:43pm

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.