Esoth
Esoth

Reputation: 437

Finding and removing objects by oid

I am trying to remove objects from a ZODB that reference classes that will no longer exist in the future. Here's the issue: I'm able to find it by oid but I don't know what's referencing it. All of the obvious stuff has been done - I deleted the actual Plone content and even the history storage.

I did an XML export to find the oid and can get it in the debugger:

from ZODB.utils import p64
>>> ob=app._p_jar[p64(113955)]
>>> list(ob)
[<InterfaceClass OFS.interfaces.IFolder>, <InterfaceClass plone.app.contenttypes.interfaces.IFolder>, <InterfaceClass plone.folder.interfaces.IFolder>, <InterfaceClass Products.CMFCore.interfaces._content.IFolderish>, <InterfaceClass Products.GroupSpace.interfaces.IGroupSpace>, <InterfaceClass z3c.relationfield.interfaces.IHasIncomingRelations>, <InterfaceClass z3c.relationfield.interfaces.IHasOutgoingRelations>, <InterfaceClass z3c.relationfield.interfaces.IHasRelations>, <InterfaceClass plone.namedfile.interfaces.IImageScaleTraversable>, <SchemaClass ims.issuetracker.interfaces.IIssue>, <InterfaceClass OFS.interfaces.IItem>, <InterfaceClass zope.container.interfaces.IItemContainer>, <InterfaceClass zope.interface.common.mapping.IItemMapping>, <InterfaceClass plone.app.iterate.interfaces.IIterateAware>, <SchemaClass ims.behaviors.interfaces.modified.ILastModifiedBy>, <InterfaceClass plone.portlets.interfaces.ILocalPortletAssignable>, <InterfaceClass zope.location.interfaces.ILocation>, <InterfaceClass OFS.interfaces.IManageable>, <InterfaceClass Products.CMFCore.interfaces._content.IMinimalDublinCore>, <InterfaceClass Products.CMFCore.interfaces._content.IMutableDublinCore>, <InterfaceClass Products.CMFCore.interfaces._content.IMutableMinimalDublinCore>, <InterfaceClass plone.app.dexterity.behaviors.filename.INameFromFileName>, <InterfaceClass plone.app.content.interfaces.INameFromTitle>, <InterfaceClass App.interfaces.INavigation>, <SchemaClass plone.app.dexterity.behaviors.nextprevious.INextPreviousToggle>, <InterfaceClass OFS.interfaces.IObjectManager>]

That Products.GroupSpace.interfaces.IGroupSpace class will no longer exist. I just want to remove this. "ob" is an instance of BTrees.OOBTree.OOBucket but that's all I know - although I am almost positive it is in the PersistentComponents of the portal, that's still rather vague.

Upvotes: 0

Views: 363

Answers (1)

Related Questions