Skip to content

[REWORK] Implement Recycle Bin#4223

Open
rohnsha0 wants to merge 122 commits intomasterfrom
rohnsha0-plip-recyclebin-patch
Open

[REWORK] Implement Recycle Bin#4223
rohnsha0 wants to merge 122 commits intomasterfrom
rohnsha0-plip-recyclebin-patch

Conversation

@rohnsha0
Copy link
Copy Markdown
Member

@rohnsha0 rohnsha0 commented Sep 21, 2025

ref #2966

to be merged together:-

  • plone.base - #81
  • plone.app.discussion - #284
  • plone.app.content - #312
  • plone.app.vocabulary - #109
RecycleBinView RecycleBinItemView

replaces #4168

rohnsha0 and others added 30 commits September 20, 2025 21:52
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: David Glick <david@glicksoftware.com>
@rohnsha0 rohnsha0 requested a review from davisagli September 29, 2025 04:39
@rohnsha0
Copy link
Copy Markdown
Member Author

@davisagli, I have made the next set of changes with some clarifications reqd from u... check #4223 (comment)

Comment thread src/Products/CMFPlone/recyclebin.py Outdated
child_path = child_data.get("path")
child_orig_id = child_data.get("id")

for storage_id, storage_data in list(self.storage.get_items()):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rohnsha0 Okay, I took another look. Actually I misunderstood. The children are only stored under their parent in ["children"], and not separately stored at the top level of the recycle bin. I think that is good.

I also think it means we don't need to do this process to clean up items with the same path as a child. If I delete an item /a that has a child /a/b, and then I create a new item /a/b and delete it, it should exist as a separate entry in the recycle bin. Restoring or purging the first item that was deleted should not affect the second one. It should remain in the recycle bin, and could be restored to a different path.

Comment thread src/Products/CMFPlone/recyclebin.py Outdated
return False

try:
# Purge any nested children first if this is a folder
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And similarly, I don't think we need or want to do this.

# Get items sorted by date (oldest first) and calculate total size
for item_id, data in self.storage.get_items_sorted_by_date(reverse=False):
size = data.get("size", 0)
total_size += size
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also include the size of any children, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davisagli please verify the changes

@wesleybl
Copy link
Copy Markdown
Member

@davisagli @rohnsha0 Is there any chance this will be ready for Plone 6.2?

@davisagli
Copy link
Copy Markdown
Member

@wesleybl No, we decided not to push it for 6.2. We'd like to deliver it with support in both Classic UI and Volto. I will try to work on it at the Beethoven Sprint.

@rohnsha0 rohnsha0 requested a review from davisagli April 26, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

7 participants