Can't empty the Trash

Permalink
Hi,

I have an issue on a site (running on v5.7.5.13) whereby I can't empty the Trash (in Dashboard -> Full Sitemap), or delete any pages in the Trash individually.

If I try to do either, I get the 'delete pages' modal window appearing, the progress bar appears for about half a second, then is replaced with this error:

{"error":{"message":"An error occurred while processing this request."},"errors":["An error occurred while processing this request."]}

Each time I try either, nothing gets deleted, and I get the following log entry:

Page "" at path "/!trash/1710" deleted

======

Anyone else seen this?

drbiskit
View Replies: View Best Answer
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi drbiskit,

Were you able to successfully empty trash before?
drbiskit replied on at Permalink Reply
drbiskit
Hi MrKDilkington - To be honest I haven't ever actually tried to do it before. I inherited the site from another developer so I will try to find out if they ever did it successfully.
drbiskit replied on at Permalink Best Answer Reply
drbiskit
*UPDATE*

I've now managed to empty the Trash. It appears there was an issue with a number of pages in the trash that was stopping them being deletable. I'm not sure quite what yet, but I think it might possibly be pages with versions that hadn't been approved. I had to go into the database to remove the offending pages (from the 'Collections' table). Once all were removed from the db, I could successfully empty the Trash.

Still trying to work out exactly what the issue was with the offending pages. Will update this if/when I find out the reason.

Marking this as best answer in case anyone else has this issue.
drbiskit replied on at Permalink Reply
drbiskit
*ANOTHER UPDATE*

I finally got to the root cause of this issue.

I had some pages and drafts in the system that were causing 2 issues:

1 - They were not allowing the 'Index Search Engine - All' Automated job to run - it would get partially through the job and then show the error: Invalid or Empty Node passed to getItem constructor.

2 - They could not be deleted in any way via the CMS. To delete I had to go into the database -> 'Collections' table, find them by Page ID, and delete them manually.

==

The cause was that I had a page type set up that had a custom attribute included in the Pages & Themes -> Page Types -> Edit Form -> Compose Form. At some point that custom attribute had been removed from the site, but it was still showing in the 'Edit Form' setup page. Once I removed that from the Edit form, everything worked as normal.

Random annoying bug, but took me a while to find, so felt it was worth sharing.
c5dragon replied on at Permalink Reply
c5dragon
You can open the trash and delete the individual items.
- What you already tried.
drbiskit replied on at Permalink Reply
drbiskit
Hi c5dragon - Thanks for your message, but I'm not able to do that - as mentioned above in original post and just to confirm that I can't empty the trash, or delete pages in the trash individually.