Jump to content

Pages not shown in trash, restore instead of delete


Recommended Posts

Posted

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!

 

image.png.73cd0aca9fb0baed1f339c8edca40160.png

image.png.f675fca07bf52850ecf7f63ae84c77e9.png

Posted

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.

Posted

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.

  • 2 weeks later...
Posted

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.

Posted

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!

  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...