使用collective.geo.behaviour和dexterity会导致站点失败



我有一个奇怪的问题,当我试图使用collective.geo.behavior与我的灵巧内容类型(命名为profilmember)。我使用文件系统的方式来创建内容类型(不是TTW)。

如果没有collective.geo.behavior,我可以在Plone站点的根目录或任何子文件夹中创建profilmember。没错。

使用collective.geo.behavior行为,我可以在Plone站点的根目录中创建profilmember,但是如果在经典文件夹中创建这个内容类型,我的Plone站点会崩溃(在浏览器中):

ValueError('No object with id "" exists.',) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: No object with id "" exists.)

此消息不仅出现在内容视图中,而且出现在整个站点(这是坏的)

要恢复,我需要在portal_catalog中设置"Clear and rebuild"。当我再次创建memberprofile时,允许我查看memberprofile和文件夹内容

(项目在github: https://github.com/tristanlt/iuem.cargo)

下面是创建内容后的调试跟踪:

  Module zope.contentprovider.tales, line 77, in __call__
  Module zope.viewlet.manager, line 112, in update
  Module zope.viewlet.manager, line 118, in _updateViewlets
  Module plone.app.layout.viewlets.common, line 187, in update
  Module Products.CMFPlone.browser.navigation, line 183, in topLevelTabs
  Module Products.CMFPlone.CatalogTool, line 428, in searchResults
  Module Products.ZCatalog.ZCatalog, line 604, in searchResults
  Module Products.ZCatalog.Catalog, line 907, in searchResults
  Module Products.ZCatalog.Catalog, line 656, in search
  Module Products.ZCatalog.Catalog, line 676, in sortResults
  Module plone.app.folder.nogopip, line 104, in documentToKeyMap
  Module plone.folder.ordered, line 102, in getObjectPosition
  Module plone.folder.default, line 128, in getObjectPosition
ValueError: No object with id "" exists.

我认为这个提交解决了你的问题:

  • https://github.com/collective/collective.geo.geographer/commit/d950d7ade1d348e77e66dfa1217c53bf2dea20f0

使用Dexterity, gereferencingannotator的上下文被Acquisition封装。现在我已经用获取打开了上下文。aq_base

最新更新