我的plone站点出现POSKeyError,只在floder中损坏,其他内容正确
I got a POSKeyError in my plone site, and only broken in a floder, other contents are correct
在我的plone站点,一个文件夹中的错误信息,如下
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)
并且,在 client1/event.log 中,我可以找到如下详细消息:
追溯(最里面的最后一个):
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
我不知道如何解决,有什么建议吗?
我解决了这个问题参考这个post:
http://plonechix.blogspot.tw/2009/12/definitive-guide-to-poskeyerror.html
完整的操作如下,
进入命令行
bin/zopepy
然后,
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()
最后一定要清空重建ZMI中portal_catalog的目录
在我的plone站点,一个文件夹中的错误信息,如下
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)
并且,在 client1/event.log 中,我可以找到如下详细消息:
追溯(最里面的最后一个):
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
我不知道如何解决,有什么建议吗?
我解决了这个问题参考这个post:
http://plonechix.blogspot.tw/2009/12/definitive-guide-to-poskeyerror.html
完整的操作如下,
进入命令行
bin/zopepy
然后,
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()
最后一定要清空重建ZMI中portal_catalog的目录