DefaultOrdering.moveObjectsByDelta calls notifyContainerModified(self.context), so all moveObjects* / moveObjectToPosition paths emit IContainerModifiedEvent. orderObjects (sort by key or reverse) mutates the same order annotation but fires nothing. Same in PartialOrdering.
Together with OFS (_setObject/_delObject, CopySupport) this makes orderObjects the only ordering mutation that subscribers cannot observe. Anything that mirrors folder order externally misses these changes; concrete case: plone.pgcatalog keeps stored getObjPositionInParent values in sync via an IContainerModifiedEvent subscriber (see bluedynamics/plone-pgcatalog#216).
Proposal: call notifyContainerModified(self.context) at the end of orderObjects when the order was touched, in both implementations. Happy to send a PR.
DefaultOrdering.moveObjectsByDeltacallsnotifyContainerModified(self.context), so allmoveObjects*/moveObjectToPositionpaths emitIContainerModifiedEvent.orderObjects(sort by key or reverse) mutates the same order annotation but fires nothing. Same inPartialOrdering.Together with OFS (
_setObject/_delObject, CopySupport) this makesorderObjectsthe only ordering mutation that subscribers cannot observe. Anything that mirrors folder order externally misses these changes; concrete case: plone.pgcatalog keeps storedgetObjPositionInParentvalues in sync via anIContainerModifiedEventsubscriber (see bluedynamics/plone-pgcatalog#216).Proposal: call
notifyContainerModified(self.context)at the end oforderObjectswhen the order was touched, in both implementations. Happy to send a PR.