我无法管理 portlet

发布于 2024-11-25 04:55:39 字数 6188 浏览 0 评论 0原文

我刚刚将我的门户从 3.3.5 迁移到最新版本 4.0.7 我进行了新安装并迁移了我的 Data.fs

当我单击管理 Portlet 时,我无法查看添加 Portlet 组合,当我单击管理 Portlet 时,我看到此错误并且站点崩溃:

Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply  
  Module ZPublisher.Publish, line 47, in call_object
  Module Products.Five.browser.metaconfigure, line 477, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 60, in __call__
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 531, in do_optTag_tal
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
  Module Products.PageTemplates.Expressions, line 220, in evaluateStructure  
  Module zope.tales.tales, line 696, in evaluate
   - URL: file:/usr/local/Plone/buildout-cache/eggs/Plone-4.0.7-py2.6.egg/Products/CMFPlone/skins/plone_templates/main_template.pt
   - Line 95, Column 22
   - Expression: <StringExpr u'plone.leftcolumn'>
   - Names:
      {'args': (),
       'container': <PloneSite at /Plone>,
       'context': <PloneSite at /Plone>,
       'default': <object object at 0x7f2637572ae0>,
       'here': <PloneSite at /Plone>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xa39a730>,
       'request': <HTTPRequest, URL=http://192.168.198.39:8080/Plone/@@manage-group-portlets>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7375550>,
       'traverse_subpath': [],
       'user': <PloneUser 'mlopez'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /usr/local/Plone/buildout-cache/eggs/plone.app.portlets-2.0.4-py2.6.egg/plone/app/portlets/browser/templates/manage-group.pt object at 0xa392890>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x9da9f90>}
  Module zope.contentprovider.tales, line 80, in __call__
  Module plone.app.portlets.browser.editmanager, line 66, in render
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 60, in __call__
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__  
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 531, in do_optTag_tal
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 819, in do_loop_tal
  Module zope.tales.tales, line 682, in setRepeat
  Module zope.tales.tales, line 696, in evaluate
   - URL: /usr/local/Plone/buildout-cache/eggs/plone.app.portlets-2.0.4-py2.6.egg/plone/app/portlets/browser/templates/edit-manager-macros.pt
   - Line 45, Column 8
   - Expression: <PathExpr standard:u'view/portlets'>
   - Names:
      {'args': (),
       'container': <PloneSite at /Plone>,
       'context': <PloneSite at /Plone>,
       'default': <object object at 0x7f2637572ae0>,
       'here': <PloneSite at /Plone>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xa37c838>,
       'request': <HTTPRequest, URL=http://192.168.198.39:8080/Plone/@@manage-group-portlets>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x737f510>,
       'traverse_subpath': [],
       'user': <PloneUser 'mlopez'>,
       'view': <plone.app.portlets.browser.editmanager.EditPortletManagerRenderer object at 0xa39b610>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0xa39be10>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 157, in _eval
  Module Products.PageTemplates.Expressions, line 119, in render
  Module plone.app.portlets.browser.editmanager, line 78, in portlets  
  Module plone.memoize.view, line 47, in memogetter
  Module plone.app.portlets.browser.editmanager, line 171, in _lazyLoadAssignments
  Module plone.app.portlets.browser.manage, line 213, in getAssignmentsForManager
  Module zope.container.btree, line 88, in __getitem__
KeyError: 'group'

x

I Just migrated my portal to the newest version 4.0.7 from 3.3.5
I did a new install and migrate my Data.fs

When i click to manage Portlets i can't view de Add Portlet Combo, and when i click on manage portlets i see this error and the site crashes:

Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply  
  Module ZPublisher.Publish, line 47, in call_object
  Module Products.Five.browser.metaconfigure, line 477, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 60, in __call__
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 531, in do_optTag_tal
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
  Module Products.PageTemplates.Expressions, line 220, in evaluateStructure  
  Module zope.tales.tales, line 696, in evaluate
   - URL: file:/usr/local/Plone/buildout-cache/eggs/Plone-4.0.7-py2.6.egg/Products/CMFPlone/skins/plone_templates/main_template.pt
   - Line 95, Column 22
   - Expression: <StringExpr u'plone.leftcolumn'>
   - Names:
      {'args': (),
       'container': <PloneSite at /Plone>,
       'context': <PloneSite at /Plone>,
       'default': <object object at 0x7f2637572ae0>,
       'here': <PloneSite at /Plone>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xa39a730>,
       'request': <HTTPRequest, URL=http://192.168.198.39:8080/Plone/@@manage-group-portlets>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7375550>,
       'traverse_subpath': [],
       'user': <PloneUser 'mlopez'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /usr/local/Plone/buildout-cache/eggs/plone.app.portlets-2.0.4-py2.6.egg/plone/app/portlets/browser/templates/manage-group.pt object at 0xa392890>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x9da9f90>}
  Module zope.contentprovider.tales, line 80, in __call__
  Module plone.app.portlets.browser.editmanager, line 66, in render
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 60, in __call__
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__  
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 531, in do_optTag_tal
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 819, in do_loop_tal
  Module zope.tales.tales, line 682, in setRepeat
  Module zope.tales.tales, line 696, in evaluate
   - URL: /usr/local/Plone/buildout-cache/eggs/plone.app.portlets-2.0.4-py2.6.egg/plone/app/portlets/browser/templates/edit-manager-macros.pt
   - Line 45, Column 8
   - Expression: <PathExpr standard:u'view/portlets'>
   - Names:
      {'args': (),
       'container': <PloneSite at /Plone>,
       'context': <PloneSite at /Plone>,
       'default': <object object at 0x7f2637572ae0>,
       'here': <PloneSite at /Plone>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xa37c838>,
       'request': <HTTPRequest, URL=http://192.168.198.39:8080/Plone/@@manage-group-portlets>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x737f510>,
       'traverse_subpath': [],
       'user': <PloneUser 'mlopez'>,
       'view': <plone.app.portlets.browser.editmanager.EditPortletManagerRenderer object at 0xa39b610>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0xa39be10>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 157, in _eval
  Module Products.PageTemplates.Expressions, line 119, in render
  Module plone.app.portlets.browser.editmanager, line 78, in portlets  
  Module plone.memoize.view, line 47, in memogetter
  Module plone.app.portlets.browser.editmanager, line 171, in _lazyLoadAssignments
  Module plone.app.portlets.browser.manage, line 213, in getAssignmentsForManager
  Module zope.container.btree, line 88, in __getitem__
KeyError: 'group'

x

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁的年少不轻狂 2024-12-02 04:55:39

您的站点中似乎存在损坏的 portlet 管理器;它缺少“组”类别。不过,这通常不会发生。

您可以打开 plone.app.portlets.browser.manage 模块,并插入 PDB 调试提示符,以查看这是什么管理器。在 bin/instance 脚本中查找 plone.app.portlets Egg 以找到其路径,然后打开其中的 plone/app/portlets/browser/manage.py您最喜欢的文本编辑器。插入您的导入pdb; pdb.set_trace() 第 213 行之前的行,在前台模式下运行您的 plone 站点 (bin/instance fg) 并开始四处查看。 manager.__name__ 应该很有趣,例如,弄清楚这是什么经理。

然后,您可以尝试通过插入一个空的类别映射器来修复此问题:

from plone.portlets.storage import PortletCategoryMapping
from plone.portlets.constants import GROUP_CATEGORY
column[GROUP_CATEGORY] = PortletCategoryMapping()

不过,您可能需要小心;这里可能还有其他东西坏了。

There appears to be a corrupted portlet manager in your site; it is missing the "group" category. This doesn't normally happen, though.

You could open the plone.app.portlets.browser.manage module, and insert a PDB debug prompt, to see what manager this is. Look for the plone.app.portlets egg in your bin/instance script to find its path, then open the plone/app/portlets/browser/manage.py that in your favourite text editor. Insert your import pdb; pdb.set_trace() line before line 213, run your plone site in foreground mode (bin/instance fg) and start poking around. manager.__name__ should be interesting, for example, to figure out what manager this is.

You could then try to repair this by inserting an empty category mapper:

from plone.portlets.storage import PortletCategoryMapping
from plone.portlets.constants import GROUP_CATEGORY
column[GROUP_CATEGORY] = PortletCategoryMapping()

You may want to be careful with that, though; there may be other things broken here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文