2010/4/15 Enrique Pérez <[email protected]>: > Martin Aspeli wrote: >> >> On 14 April 2010 23:22, Enrique Perez <[email protected]> wrote: >> >>> >>> Hi, >>> >>> I'm trying to assign a portlet to a manager with an assignment of >>> category >>> content_type. This is with a vanilla plone-4.0b1-1. The only addition to >>> a >>> vanilla plone is, in the portlets.xml of the GS profile of CMFPlone, >>> >>> <assignment name="news" category="content_type" key="Folder" >>> manager="plone.rightcolumn" type="portlets.News" visible="True"> >>> <property name="count">5</property> >>> </assignment> >>> >>> and then run the import step. However, after this (and adding a folder >>> and a >>> news item), I cannot see the portlet in any Folder object. Inspecting the >>> portlet manager, I see that: >>> >>> ipdb> manager = getUtility(IPortletManager, name=u"plone.rightcolumn") >>> ipdb> manager['content_type']['Folder'] >>> <plone.app.portlets.storage.PortletAssignmentMapping object at >>> 0x2aaaac9c57d0> >>> >>> I've got a PortletAssignmentMapping... If I delete it and add a >>> PortletCategoryMapping instead, like: >>> >>> >>> ipdb> del manager['content_type']['Folder'] >>> ipdb> manager['content_type']['Folder'] = PortletCategoryMapping() >>> ipdb> from plone.app.portlets.portlets.news import Assignment >>> ipdb> manager['content_type'][u'Folder']['news'] = Assignment() >>> >>> The portlet shows properly in Folders. I'm I missing something, or is >>> this a >>> bug? >>> >> >> Sounds like it. >> >> What's the data structure if you do it TTW (types control panel)? >> What if you do it TTW and export? >> >> > > Thanks for the reply, even though you've managed to throw me back into > confusion :-) > If I do it TTW, the portlet shows right away; if I export the configuration, > I get the exact same xml snippet as above; but if I inspect the manager, I > see that I have, for the ['content_type']['Folder'] keys, a > PortletAssignmentMapping and not a PortletCategoryMapping. I'll keep > digging into the issue.
It's quite possible that the GS importer is doing something wrong. I'd look for bugs there. Martin _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
