Error while deleting a content

Some time ago, I migrated content from an old Plone website to a Volto website with "collective.exportimport". Later, I wanted to delete some wrongly migrated pages but I received an error. I think it is giving this error because of a missing file. To fix this, I also tried rebuilding the catalog but it also gave the same error.

What would be the best way to delete these stubborn content?

We’re sorry, but there seems to be an error…
Here is the full error message:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 390, in publish_module
  Module ZPublisher.WSGIPublisher, line 285, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module plone.dexterity.content, line 773, in manage_delObjects
  Module OFS.ObjectManager, line 558, in manage_delObjects
  Module Products.BTreeFolder2.BTreeFolder2, line 479, in _delObject
  Module zope.event, line 33, in notify
  Module zope.component.event, line 27, in dispatch
  Module zope.component._api, line 134, in subscribers
  Module zope.interface.registry, line 445, in subscribers
  Module zope.interface.adapter, line 896, in subscribers
  Module zope.component.event, line 36, in objectEventNotify
  Module zope.component._api, line 134, in subscribers
  Module zope.interface.registry, line 445, in subscribers
  Module zope.interface.adapter, line 896, in subscribers
  Module OFS.subscribers, line 102, in dispatchObjectWillBeMovedEvent
  Module zope.container.contained, line 156, in dispatchToSublocations
  Module zope.component._api, line 138, in handle
  Module zope.interface.registry, line 445, in subscribers
  Module zope.interface.adapter, line 896, in subscribers
  Module OFS.subscribers, line 102, in dispatchObjectWillBeMovedEvent
  Module zope.container.contained, line 156, in dispatchToSublocations
  Module zope.component._api, line 138, in handle
  Module zope.interface.registry, line 445, in subscribers
  Module zope.interface.adapter, line 896, in subscribers
  Module OFS.subscribers, line 102, in dispatchObjectWillBeMovedEvent
  Module zope.container.contained, line 155, in dispatchToSublocations
  Module OFS.subscribers, line 82, in sublocations
  Module ZTUtils.Lazy, line 197, in __getitem__
  Module plone.folder.ordered, line 68, in _getOb
AttributeError: 'een-postume-samenwerking-ine-schoder-en-haar-archief-still-uit-video-joep-vossebeld-en-charlotte-lagro.jpg'

Versions:

  • Volto 16.20.8
  • Plone 6.0.5
  • Zope 5.8.2

Seems you've some subscriber that tries to do something when the object is deleted/moved. Do you have some content rule or Plone addon in this site?

Thank you for the answer @yurj.

Below, I am adding the add-ons of the website. Do you have any suggestions about how to find which one might be causing this problem?

  • collective.volto.socialsettings
  • kitconcept.seo
  • Multilingual Support
  • Plone 6 Frontend (plone.volto)
  • plone.restapi
  • Volto Editable Footer
  • Volto: Form support
  • collective.exportimport

Cihan Andac via Plone Community wrote at 2024-1-22 00:17 +0000:

Some time ago, I migrated content from an old Plone website to a Volto website with "collective.exportimport". Later, I wanted to delete some wrongly migrated pages but I received an error. I think it is giving this error because of a missing file. To fix this, I also tried rebuilding the catalog but it also gave the same error.

What would be the best way to delete these stubborn content?
...
Traceback (innermost last):
...
Module Products.BTreeFolder2.BTreeFolder2, line 479, in _delObject
Module zope.event, line 33, in notify
...
Module OFS.subscribers, line 82, in sublocations
Module ZTUtils.Lazy, line 197, in getitem
Module plone.folder.ordered, line 68, in _getOb
AttributeError: 'een-postume-samenwerking-ine-schoder-en-haar-archief-still-uit-video-joep-vossebeld-en-charlotte-lagro.jpg'

Apparently, your catalog is inconsistent (as you already assumed).

Note that there are two ways to rebuild a catalog: one clears all indexes
and metadata but keeps the set of indexed objects and reindexes them
(skipping objects no longer present); the other completely rebuilds
the catalog determining the content object by traversing the content tree.

However, as non existing objects should in any case be avoided,
you may have in addition an inconsistent container object.
Containers usually maintain the ids of contained items separately
from the items themselves. If those two structures become inconsistent,
you may observe (as you do) that the container says "I have this item"
but an access to the idem results in an exception.
You could check this by determining the container which
should contain your missing object and look at its attributes.
You could do this in an interactive session.

Alternatively, you could install Products.PDBDebugMode.
If your Plone backend then runs in the foreground and in "debug mode",
an exception will enter the Python debugger which allows you
to analyse the state including the involved objects.