Soma Posted September 4, 2011 Share Posted September 4, 2011 I experienced something strange once I deleted a few pages. Suddenly I realized I deleted wrong page with lots of subpages, so I wanted to open trash to recover it. But I couldn't open trash, it loads and gets stuck, so I can't do anything anymore. I went to change parent id of the page I wanted to recover manually in DB, it worked and page is there again, but trash still doesn't open. I remember having deleted two pages using same name I created earlier, may this caused the problem. Well after empty trash it work again. Can't really say what happened or recreate it. Link to comment Share on other sites More sharing options...
Soma Posted September 4, 2011 Author Share Posted September 4, 2011 Well no I got a problem with the Page recovered, it doesn't show up in navigation on page. When I go edit page it says: "This page is in the Trash", How can I fix this? EDIT: Just figured changed the status to 1 in the DB, it shows up again. Is this all that is to it? EDIT: Just noticed all childpages also changed state to 8193. So I lost all status information of the pages (some were unpublished or hidden). :-\ Link to comment Share on other sites More sharing options...
ryan Posted September 5, 2011 Share Posted September 5, 2011 I'm not sure how to reproduce the first issue you brought up. I've tried several times dragging trees into the trash and out again, but no luck. Please let me know if you are able to reproduce it again at some point. I was able to reproduce the second issue you brought up, which was a loss of status when trees as trashed all at once. It would just give them all a "trash" status, removing any previous unpublished, hidden or locked status they may have had before. I've just fixed this in the latest commit. Thanks for finding it! Sorry for the lost status in your tree. Btw, it can sometimes be dangerous changing stuff in the DB directly, outside of PW's API. It sidesteps several other things that occur when a page is saved. There are other tables involved in every $pages->save() so manipulating the data directly, even a simple parent change or status change, can cause problems. Not major problems, but still, it's best to try and make the change from the API. And if that still doesn't do it then post here and we'll figure out a safe solution. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now