Closed vincentfretin closed 4 years ago
I updated the issue description with what I understood and committed a fix for this case.
I added a changelog entry. I don't know what is the process here for CMF packages in the zopefoundation organization to merge a PR. Can I merge myself? I signed the zope contributor agreement a long time ago. :-) I see @dataflake did the latest release. Can we please have a 2.4.8 release with this fix to include it in Plone 5.2.2?
Version 2.4.8 with this fix is now released
That was fast! Thank you.
See https://github.com/plone/Products.CMFPlone/issues/2585#issuecomment-653548738 for details. An unindex followed by reindex gives only a unindex. It should really be doing a reindex.
The issue is that
optimize to:
instead of:
In the indexing.py file the line that is wrong is https://github.com/zopefoundation/Products.CMFCore/blob/55fe79456990b530a00ec3a41005660403421087/Products/CMFCore/indexing.py#L187
in the case of
op = UNINDEX (-1)
andiop = REINDEX (0)
, op stays at-1
, but it should be at0
. Theop += iop
works well when you have a symmetryUNINDEX (-1)
followed byINDEX (1)
, it givesREINDEX (0)
. But here in reality, we may getop = UNINDEX (-1)
followed byiop = REINDEX (0)