Search code examples
plonezodb

I got a POSKeyError in my plone site, and only broken in a floder, other contents are correct


In my plone site, an error message in a folder, as below

POSKeyError('\x00\x00\x00\x00\x00\x00s\x10',) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: s)

And, in client1/event.log, I can find the detail message as below:

Traceback (innermost last):

Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module plone.dexterity.content, line 707, in manage_delObjects
Module OFS.ObjectManager, line 540, in manage_delObjects
Module Products.BTreeFolder2.BTreeFolder2, line 477, in _delObject
Module zope.event, line 31, in notify
Module zope.component.event, line 24, in dispatch
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module zope.component.event, line 32, in objectEventNotify
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module OFS.subscribers, line 101, in dispatchObjectWillBeMovedEvent
Module zope.container.contained, line 152, in dispatchToSublocations
Module OFS.subscribers, line 81, in sublocations
Module plone.folder.ordered, line 87, in objectValues
Module plone.folder.ordered, line 75, in objectIds
Module plone.folder.default, line 152, in idsInOrder
Module plone.folder.default, line 163, in _order
Module zope.annotation.attribute, line 44, in get
Module ZODB.Connection, line 860, in setstate
Module ZODB.Connection, line 901, in _setstate
Module ZEO.ClientStorage, line 833, in load
Module ZEO.ServerStub, line 176, in loadEx
Module ZEO.zrpc.connection, line 768, in call
POSKeyError: 0x7310

I have no idea to solve it, Any suggestions?


Solution

  • I solve this problem reference this post:

    http://plonechix.blogspot.tw/2009/12/definitive-guide-to-poskeyerror.html

    The complete operation like below,

    Into the command line

    bin/zopepy

    And then,

    from AccessControl.SecurityManagement import newSecurityManager

    from Testing import makerequest

    from ZODB import FileStorage, DB

    import transaction

    storage = FileStorage.FileStorage('path_to/Data.fs')

    db = DB(storage)

    connection = db.open()

    root = connection.root()

    app = root['Application']

    admin = app.acl_users.getUserById('admin')

    admin = admin.of(app.acl_users)

    newSecurityManager(None, admin)

    req=makerequest.makerequest(app.mysite.bad_folder)

    req.manage_delObjects(['bad_content'])

    transaction.commit()

    At last, must be clear and rebuild catalog at portal_catalog in ZMI.