Ticket #13659 (closed Bug: fixed)

Opened 10 months ago

Last modified 6 weeks ago

Removing Group- and Typeportlets raises KeyError

Reported by: saily Owned by:
Priority: minor Milestone: 4.x
Component: Unknown Version: 4.3
Keywords: Cc:

Description

I'm using Plone 4.3.1, plone.app.contenttypes and plone.app.multilingual.

Steps to reproduce:

  • Log in as Admin
  • Go to @@manage-group-portlets?key=Administrators (or choose another one)
  • Add a portlet
  • Remove portlet

Issue is also present on types control panel when adding a new type portlet:

  • Log in as Admin
  • Go to @@manage-content-type-portlets?key=Folder
  • Add a portlet
  • Remove portlet

Both scenarios described above are raising a KeyError as shown below:

Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module plone.app.portlets.browser.editmanager, line 418, in delete_portlet
  Module plone.app.portlets.browser.editmanager, line 369, in finish_portlet_change
  Module plone.app.portlets.browser.editmanager, line 365, in _render_column
  Module plone.app.portlets.browser.editmanager, line 71, in render
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module zope.pagetemplate.pagetemplate, line 240, in __call__
  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 583, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: /home/zope/asamplesite/eggs/plone.app.portlets-2.4.4-py2.7.egg/plone/app/portlets/browser/templates/edit-manager-macros.pt
   - Line 3, Column 4
   - Expression: <PathExpr standard:u'view/addable_portlets'>
   - Names:
      {'args': (),
       'container': <PloneSite at /Plone>,
       'context': <PloneSite at /Plone>,
       'default': <object object at 0x7f64419e0c20>,
       'here': <PloneSite at /Plone>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7f6428c75680>,
       'request': <HTTPRequest, URL=http://localhost:8080/Plone/++contenttypeportlets++plone.leftcolumn+Folder/@@delete-portlet>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x6e42490>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <plone.app.portlets.browser.editmanager.EditPortletManagerRenderer object at 0x7f64127f54d0>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7f64127e9f90>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 155, in _eval
  Module Products.PageTemplates.Expressions, line 117, in render
  Module plone.app.portlets.browser.editmanager, line 151, in addable_portlets
  Module plone.app.portlets.browser.editmanager, line 96, in baseUrl
  Module plone.app.portlets.browser.manage, line 259, in getAssignmentMappingUrl
  Module ZPublisher.HTTPRequest, line 1372, in __getitem__
KeyError: 'key'

Change History

comment:1 Changed 8 months ago by pbauer

  • Status changed from new to confirmed

comment:2 Changed 6 weeks ago by ida

  • Status changed from confirmed to closed
  • Resolution set to fixed

comment:3 Changed 6 weeks ago by ida

  • Status changed from closed to reopened
  • Resolution fixed deleted

Sorry, that was too quick, the fix has been merged to the 2.4.x-branch but not been released in a stable version.

comment:4 Changed 6 weeks ago by ida

We now use a local branch of plone.app.portlets-2.4.5 with pbauer's fix included, which works fine, so far. Will this be in a stable release in some time?

comment:5 Changed 6 weeks ago by ida

  • Status changed from reopened to closed
  • Resolution set to fixed

Ok, the misunderstanding was that I couldn't see the fix in p.a.portlets-2.5.0, now learned that version is ment for Plone-5. Still odd, the history of your contribution got lost on the way to 2.5.0, reported that with #13935.

Closing this again, as the bug is fixed at least from version 2.4.6 to 2.4.8.

Note: See TracTickets for help on using tickets.