Skip to content

Fix AttributeError in orderObjects after deleting an object and restarting Zope#53

Open
wesleybl wants to merge 2 commits into4.xfrom
4.x_order_objects_stale_after_delete_and_restart
Open

Fix AttributeError in orderObjects after deleting an object and restarting Zope#53
wesleybl wants to merge 2 commits into4.xfrom
4.x_order_objects_stale_after_delete_and_restart

Conversation

@wesleybl
Copy link
Copy Markdown
Member

Backport of #50 to plone.folder 4.x

@mister-roboto
Copy link
Copy Markdown

@wesleybl thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

…estarting Zope

Replace sorted() + _set_order() with an in-place sort, preserving the PersistentList.
Copy link
Copy Markdown
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

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

On this maintenance branch, please keep the _set_order method, even though we won't call it anymore. Someone may have subclassed this and relies on the existence of this method.

Adding a warnings.warn within the method would be nice.
Possibly even add a fix:

if not isinstance(value, PersistentList):
    value = PersistentList(value)

@mauritsvanrees
Copy link
Copy Markdown
Member

mauritsvanrees commented Apr 30, 2026

Also, I see you started another branch with plone.meta to tackle the QA failures. Some more changes are needed there. I have pushed an extra commit to an own branch on top of yours:
https://github.com/plone/plone.folder/tree/config-with-default-template-2.3.3.dev0-maurits

[Update: two extra commits]

@wesleybl wesleybl requested a review from mauritsvanrees May 1, 2026 14:50
@wesleybl wesleybl force-pushed the 4.x_order_objects_stale_after_delete_and_restart branch from 38f3d4b to 111b475 Compare May 1, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants