Ticket #13833 (closed Bug: fixed)

Opened 3 years ago

Last modified 3 years ago

reindexObjectSecurity triggers a keyError when attempting to change workflow of object

Reported by: ichimdav Owned by: ichimdav
Priority: minor Milestone: 4.x
Component: Archetypes Version: 4.3
Keywords: Archetypes Cc:

Description (last modified by ichimdav) (diff)


Attempting to change the state of an object fails with a KeyError when the object contained other objects that were deleted however they remained cataloged.

In my case there were some discussion items which were removed but for some reason portal_catalog still had reference to them.

If we look at this line for older versions of Zope there should only be a warning if an object is not found however using Plone 4.3.2 unrestrictedTraverse triggers the KeyError.

I believe that reindexObjectSecurity should return a warning and skip over the object that it can't find instead of crashing all together.

Change History

comment:1 Changed 3 years ago by ichimdav

  • Owner set to davisagli
  • Component changed from Unknown to Archetypes
  • Description modified (diff)

comment:2 Changed 3 years ago by ichimdav

I have added a pull request which attempts to fix this issue at  https://github.com/plone/Products.Archetypes/pull/35

Waiting for feedback on this possible fix.

comment:3 Changed 3 years ago by ichimdav

Apparently this issue has been reported before https://dev.plone.org/ticket/12048 however it was never checked or fixed as I am attempting to do now.

comment:4 Changed 3 years ago by ichimdav

  • Owner changed from davisagli to ichimdav
  • Status changed from new to assigned
  • Description modified (diff)

comment:5 Changed 3 years ago by ichimdav

  • Status changed from assigned to closed
  • Resolution set to fixed

Issue fixed by merging my changes both within the 1.9.x and master branch of Products.Archetypes

Note: See TracTickets for help on using tickets.