Skip to content

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

Merged
mauritsvanrees merged 3 commits into
4.xfrom
4.x_order_objects_stale_after_delete_and_restart
May 4, 2026
Merged

Fix AttributeError in orderObjects after deleting an object and restarting Zope#53
mauritsvanrees merged 3 commits into
4.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.

@mauritsvanrees mauritsvanrees left a comment

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.

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

mauritsvanrees commented Apr 30, 2026

Copy link
Copy Markdown
Member

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

@mauritsvanrees mauritsvanrees left a comment

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.

Thanks.
I merged your plone.meta PR to 4.x and updated this PR with it via GitHub. Jenkins was green before, so no need to run it again. I merge.

@mauritsvanrees mauritsvanrees merged commit 3373585 into 4.x May 4, 2026
12 of 16 checks passed
@mauritsvanrees mauritsvanrees deleted the 4.x_order_objects_stale_after_delete_and_restart branch May 4, 2026 10:06
@wesleybl

wesleybl commented May 4, 2026

Copy link
Copy Markdown
Member Author

@mauritsvanrees When will we get a new version of Plone 6.1? I think it's been a while since we've had one.

@mauritsvanrees

Copy link
Copy Markdown
Member

I want to make a last 6.1.5 release in May.
See https://plone.org/download/release-schedule (just updated).

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