2011/09/08

cmf.ManagePortal ComponentLookupError

在 Plone 4.1 遇到下列訊息:

File "/home/marr/Plone/buildout-cache/eggs/
AccessControl-2.13.4-py2.6-linux-i686.egg/AccessControl/security.py",
 line 165, in protectClass
  permission = getUtility(IPermission, name=permission_id)
File "/home/marr/Plone/buildout-cache/eggs/
zope.component-3.9.5-py2.6.egg/zope/component/_api.py",
 line 169, in getUtility
  raise ComponentLookupError(interface, name)
zope.configuration.config.ConfigurationExecutionError:
 <class 'zope.component.interfaces.componentlookuperror'="">:
 (<interfaceclass zope.security.interfaces.ipermission="">, 'cmf.ManagePortal')
in:
File "/home/marr/Plone/buildout-cache/eggs/
p4a.subtyper-1.2.0-py2.6.egg/p4a/subtyper/configure.zcml",
 line 49.2-55.8
  <browser:page
      name="subtyper"
      for="*"
      permission="cmf.ManagePortal"
      class=".browser.SubtyperView"
      allowed_interface=".browser.ISubtyperView"
      />

臨時的解法是修改 p4a/subtyper/configure.zcml 內容,加上:

<include package="Products.CMFCore" 
file="permissions.zcml" />

以上,應該是 add-on 昇級的議題。另外,類似的訊息還有 ComponentLookupError: (<InterfaceClass plone.keyring.interfaces.IKeyManager>, '') 的錯誤,在 ZMI portal_setup 重新載入所有的 plone.keyring KeyManager Registration 步驟就行。

No comments: