hus Posted August 20, 2019 Share Posted August 20, 2019 Hi I have encountered a strange behavior with deleting pages. ProcessWire version 3.0.123 Login as superuser I have deleted 6 pages with following result: On the page «Empty Trash» deleted pages are not listed underneath «Pages in the trash». (Menue unfolded) It says correctly that there are 6 pages in the trash. Also in the tree-view the 6 pages are no items shown in the trash (Papierkorb) and there is no count-number. Empty the trash permanently does not delete the pages, they get restored! Moving a page from the tree to the trash is also not possible with the error message «undefined» from the browser. There is no entry in the error-log. Thanks for your help! Link to comment Share on other sites More sharing options...
gmclelland Posted August 20, 2019 Share Posted August 20, 2019 I believe a lot of the "trash" issues were already fixed. Can you try upgrading your site to a newer dev version? Using this module makes upgrading easy https://modules.processwire.com/modules/process-wire-upgrade/ Link to comment Share on other sites More sharing options...
hus Posted August 22, 2019 Author Share Posted August 22, 2019 Thanks for your hint. Meanwhile, I've created a copy of my application for testing. Even after upgrading to version 3.0.138, the problem persists. Link to comment Share on other sites More sharing options...
hus Posted August 22, 2019 Author Share Posted August 22, 2019 The problem is not solved yet. Meanwhile, we use a workaround. On a newly created page all items with status 8193 are listed. From there they can be checked and then deleted. Link to comment Share on other sites More sharing options...
hus Posted September 2, 2019 Author Share Posted September 2, 2019 I have created a new superuser and found that with this login the problem with the trash does not occur. I actually want to prevent having to delete all the users as the ID changes. Link to comment Share on other sites More sharing options...
szabesz Posted September 2, 2019 Share Posted September 2, 2019 Any chance you have some hooks with baked in default superuser id (41) checks preventing something they should not do? Link to comment Share on other sites More sharing options...
hus Posted September 3, 2019 Author Share Posted September 3, 2019 Thanks for this hint! It was the following code in ready.php: $ this-> addHookAfter ('Pages :: trash', null, function ($ event) { if ($ this-> wire ('user') -> hasRole ("editor")) $ this-> wire ('session') -> redirect ("/"); }); With this code we want to prevent users from being directed to the treelist after deleting a page. The problem was, that the role editor was also assigned to the superuser. I am a processwire beginner and therefore I appreciate the support of this forum! 1 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