Ticket #9764 (closed Bug: fixed)

Opened 5 years ago

Last modified 5 years ago

Export and reimport of portlet.xml fails with nav-portlet

Reported by: jensens Owned by: maurits
Priority: major Milestone: 4.0
Component: General Version:
Keywords: Cc:

Description

It fails to exportin portal_setup the portlets, taking the XML and reimport it. I had a mix of static portlets and navigation portlet. after removing the assignment for the navigation portlet the import worked, so I think its a problem with the navigation portlet.

Change History

comment:1 Changed 5 years ago by kleist

Confirming in Plone 4 coredev buildout rev. 32134

I added a navigation portlet (the only one), on "/portal_setup" > "export" I selected the "Portlets" step and clicked "Export selected steps".

Unpacked the .tar.gz file, placed the file "portlets.xml" in "/profiles/default" of my theme, created a new Plone site, and when installing the theme:

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.CMFQuickInstallerTool.QuickInstallerTool, line 589, in installProducts
  Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 526, in installProduct
   - __traceback_info__: ('kommunlex.theme',)
  Module Products.GenericSetup.tool, line 331, in runAllImportStepsFromProfile
   - __traceback_info__: profile-kommunlex.theme:default
  Module Products.GenericSetup.tool, line 1085, in _runImportStepsFromContext
  Module Products.GenericSetup.tool, line 999, in _doRunImportStep
   - __traceback_info__: portlets
  Module plone.app.portlets.exportimport.portlets, line 700, in importPortlets
  Module Products.GenericSetup.utils, line 509, in _importBody
  Module plone.app.portlets.exportimport.portlets, line 206, in _importNode
  Module plone.app.portlets.exportimport.portlets, line 215, in _initProvider
  Module plone.app.portlets.exportimport.portlets, line 278, in _initPortlets
  Module plone.app.portlets.exportimport.portlets, line 443, in _initAssignmentNode
  Module plone.app.portlets.exportimport.portlets, line 83, in import_assignment
  Module plone.app.portlets.exportimport.portlets, line 125, in import_node
  Module plone.app.portlets.exportimport.portlets, line 163, in from_unicode
  Module zope.schema._field, line 302, in fromUnicode
  Module zope.schema._bootstrapfields, line 138, in validate
  Module zope.schema._field, line 318, in _validate
ConstraintNotSatisfied

portlet.xml:

<?xml version="1.0"?>
<!-- http://dev.plone.org/plone/ticket/9764  -->
<portlets>
 <portletmanager name="plone.dashboard1"
    type="plone.app.portlets.interfaces.IDashboard"/>
 <portletmanager name="plone.rightcolumn"
    type="plone.app.portlets.interfaces.IRightColumn"/>
 <portletmanager name="plone.dashboard2"
    type="plone.app.portlets.interfaces.IDashboard"/>
 <portletmanager name="plone.leftcolumn"
    type="plone.app.portlets.interfaces.ILeftColumn"/>
 <portletmanager name="plone.dashboard3"
    type="plone.app.portlets.interfaces.IDashboard"/>
 <portletmanager name="plone.dashboard4"
    type="plone.app.portlets.interfaces.IDashboard"/>
 <portlet title="Login" addview="portlets.Login"
    description="A portlet which can render a log-in box">
  <for interface="plone.app.portlets.interfaces.IColumn"/>
 </portlet>
 <portlet title="Collection portlet"
    addview="plone.portlet.collection.Collection"
    description="A portlet which displays the results of a collection query"/>
 <portlet title="Review list" addview="portlets.Review"
    description="A portlet which can render a listing on the review queue.">
  <for interface="plone.app.portlets.interfaces.IColumn"/>
  <for interface="plone.app.portlets.interfaces.IDashboard"/>
 </portlet>
 <portlet title="RSS Feed" addview="portlets.rss"
    description="A portlet which can receive and render an RSS feed.">
  <for interface="plone.app.portlets.interfaces.IColumn"/>
  <for interface="plone.app.portlets.interfaces.IDashboard"/>
 </portlet>
 <portlet title="Classic portlet" addview="portlets.Classic"
    description="A portlet which can render a classic template-based portlet">
  <for interface="plone.app.portlets.interfaces.IColumn"/>
  <for interface="plone.app.portlets.interfaces.IDashboard"/>
 </portlet>
 <portlet title="Calendar portlet" addview="portlets.Calendar"
    description="A portlet which can render a calendar.">
  <for interface="plone.app.portlets.interfaces.IColumn"/>
  <for interface="plone.app.portlets.interfaces.IDashboard"/>
 </portlet>
 <portlet title="Search" addview="portlets.Search"
    description="A portlet which shows a search box.">
  <for interface="plone.app.portlets.interfaces.IColumn"/>
  <for interface="plone.app.portlets.interfaces.IDashboard"/>
 </portlet>
 <portlet title="Recent items" addview="portlets.Recent"
    description="A portlet which can render a listing of recently changed items.">
  <for interface="plone.app.portlets.interfaces.IColumn"/>
  <for interface="plone.app.portlets.interfaces.IDashboard"/>
 </portlet>
 <portlet title="News" addview="portlets.News"
    description="A portlet which can render a listing of recent news">
  <for interface="plone.app.portlets.interfaces.IColumn"/>
  <for interface="plone.app.portlets.interfaces.IDashboard"/>
 </portlet>
 <portlet title="Static text portlet" addview="plone.portlet.static.Static"
    description="A portlet which can display static HTML text."/>
 <portlet title="Navigation" addview="portlets.Navigation"
    description="A portlet which can render a navigation tree">
  <for interface="plone.app.portlets.interfaces.IColumn"/>
 </portlet>
 <portlet title="Events" addview="portlets.Events"
    description="A portlet which can render a listing of recent events">
  <for interface="plone.app.portlets.interfaces.IColumn"/>
  <for interface="plone.app.portlets.interfaces.IDashboard"/>
 </portlet>
 <assignment name="recent-items" category="user" key="kleist"
    manager="plone.dashboard2" type="portlets.Recent" visible="True">
  <property name="count">5</property>
 </assignment>
 <assignment name="news" category="user" key="kleist"
    manager="plone.dashboard1" type="portlets.News" visible="True">
  <property name="count">5</property>
  <property name="state"/>
 </assignment>
 <assignment name="events" category="user" key="kleist"
    manager="plone.dashboard1" type="portlets.Events" visible="True">
  <property name="count">5</property>
  <property name="state"/>
 </assignment>
 <assignment name="review-list" category="user" key="kleist"
    manager="plone.dashboard4" type="portlets.Review" visible="True"/>
 <assignment name="navigation" category="context" key="/"
    manager="plone.leftcolumn" type="portlets.Navigation" visible="True">
  <property name="topLevel">1</property>
  <property name="currentFolderOnly">False</property>
  <property name="name"/>
  <property name="includeTop">False</property>
  <property name="bottomLevel">0</property>
  <property name="root"></property>
 </assignment>
 <blacklist category="user" location="/" manager="plone.dashboard2"
    status="acquire"/>
 <blacklist category="group" location="/" manager="plone.dashboard2"
    status="acquire"/>
 <blacklist category="content_type" location="/" manager="plone.dashboard2"
    status="acquire"/>
 <blacklist category="context" location="/" manager="plone.dashboard2"
    status="acquire"/>
 <blacklist category="user" location="/" manager="plone.dashboard3"
    status="acquire"/>
 <blacklist category="group" location="/" manager="plone.dashboard3"
    status="acquire"/>
 <blacklist category="content_type" location="/" manager="plone.dashboard3"
    status="acquire"/>
 <blacklist category="context" location="/" manager="plone.dashboard3"
    status="acquire"/>
 <blacklist category="user" location="/" manager="plone.dashboard1"
    status="acquire"/>
 <blacklist category="group" location="/" manager="plone.dashboard1"
    status="acquire"/>
 <blacklist category="content_type" location="/" manager="plone.dashboard1"
    status="acquire"/>
 <blacklist category="context" location="/" manager="plone.dashboard1"
    status="acquire"/>
 <blacklist category="user" location="/" manager="plone.dashboard4"
    status="acquire"/>
 <blacklist category="group" location="/" manager="plone.dashboard4"
    status="acquire"/>
 <blacklist category="content_type" location="/" manager="plone.dashboard4"
    status="acquire"/>
 <blacklist category="context" location="/" manager="plone.dashboard4"
    status="acquire"/>
 <blacklist category="user" location="/" manager="plone.leftcolumn"
    status="acquire"/>
 <blacklist category="group" location="/" manager="plone.leftcolumn"
    status="acquire"/>
 <blacklist category="content_type" location="/" manager="plone.leftcolumn"
    status="acquire"/>
 <blacklist category="context" location="/" manager="plone.leftcolumn"
    status="acquire"/>
 <blacklist category="user" location="/" manager="plone.rightcolumn"
    status="acquire"/>
 <blacklist category="group" location="/" manager="plone.rightcolumn"
    status="acquire"/>
 <blacklist category="content_type" location="/" manager="plone.rightcolumn"
    status="acquire"/>
 <blacklist category="context" location="/" manager="plone.rightcolumn"
    status="acquire"/>
</portlets>

comment:2 Changed 5 years ago by maurits

  • Owner set to maurits

This is a duplicate of ticket:9437, but then for Plone 4. For Plone 3 this has been fixed in r30771. I'll have a look at Plone 4.

comment:3 Changed 5 years ago by maurits

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

(In [32867]) Merge r30771 from branches/1.2: Support for portal-relative paths in portlets.xml keys. Fixes #9764

comment:4 Changed 3 years ago by davisagli

  • Component changed from Infrastructure to General
Note: See TracTickets for help on using tickets.