GSOC Recycle Bin Project

"Recycle bin is a very complex topic IMHO because there are multiple ways to implement it and the community never reached a conclusion on what's the ‘right way’ of doing it." @tisto ( Gsoc 2022 Aspirant Interested in Undo Control Panel project idea - #11 by tisto).

I would like to find out from the Plone community what is the ‘right way’ of building a recycle bin in Plone and I’m hoping you all can help me by completing this survey. Maybe we won’t find the perfect solution but I would like to implement a solution that has the blessing of the majority of the community.

In the survey I have done some analysis of the existing recycle bin projects, please take a few minutes to read the analysis and answer the 6 questions.

Survey link: https://forms.gle/KDJzkamJxaNBURbv9

Thanks in advance,
Bhuvan

1 Like

Morning all. Bhuvan says he has had only one response to his survey. Please find 10 minutes to complete the it to help him develop an add-on that rests on top of the experience of the community instead of his own early insights.

4 Likes

Done. I've also suggested that zodb already store deleted objects and they can be retrieved using zodb tools.

Answered and posted to Twitter to increase outreach.

1 Like

I have not used any of the mentioned projects, nor anything else (except the Undo tab in the ZMI, but that is not what should be done in this project).

I do have a completely different idea: use the versioned information from Products.CMFEditions. In default Plone this is used to keep a history of changes for Documents/Pages, and other portal types, depending on how you configure it. The version history is visible for editors on the history view, like here on demo. You can compare and go back to a previous version.

Currently, when a document is deleted, its history is removed as well, using this event subscriber. If you disable this, then the history would be kept. From that, it should be possible to restore the last version of a document, just like you can go back to a previous version of a still existing document.

Does this sound like a viable alternative?

1 Like

Thank you so much.

Thank you so much for the insight, I'll definitely look into it.

Hi @mauritsvanrees,

Thank you for taking time out of your day and giving us the insights into Products.CMFEditions. This gives us a whole new option of implementing the recycle bin feature in plone. However the problem is I didn't completely get what you are trying to say. Here's what I understood, please correct me if I'm wrong.

Content type objects are stored in the ZODB and the catalog and their history in portal_historiesstorage. whenever the content object is deleted it's history is deleted along with it. If we monkey patch the purge functionality

then we can still keep the history object and then use that to bring back our file if the user wishes to.

Are you saying that the recycle bin view must find and render objects that have a history but are not in the catalog (and zodb)? Then when the user selects one of these to be restored, the object can be recreated and linked to its history.

My questions/concerns:

  • In a big site, finding histories with no objects could be very slow
  • What happens to children if the parent is deleted and restored? Will they still be attached to the portal structure or come back to their original position?
  • Anything else you would like to give me a heads up on.

Plone Foundation Code of Conduct