Jump to content
hus

Pages not shown in trash, restore instead of delete

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Any chance you have some hooks with baked in default superuser id (41) checks preventing something they should not do?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...