plone / plone.app.blocks

A 'blocks' rendering model for Plone
https://pypi.python.org/pypi/plone.app.blocks
Other
11 stars 4 forks source link

A <records /> node must have an 'interface' attribute. #80

Open 1letter opened 5 years ago

1letter commented 5 years ago

What i have installed:

What i do:

  1. Export the XML Snippet in Configuration Registry for "plone.defaultSiteLayout"
    <?xml version='1.0' encoding='UTF-8'?>
    <registry>
    <records prefix="plone.defaultSiteLayout">
    <value>++sitelayout++mytheme/singlepage.html</value>
    </records>
    </registry>
  2. add this XML Snippet to my AddOn registry.xml File in an Upgrade Step
  3. run my Upgrade Step

Traceback:

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.GenericSetup.tool, line 1089, in manage_doUpgrades
  Module Products.GenericSetup.upgrade, line 166, in doStep
  Module mytheme.singlepage.upgrades, line 54, in setup_site_props
  Module Products.GenericSetup.tool, line 358, in runImportStepFromProfile
  Module Products.GenericSetup.tool, line 1281, in _doRunImportStep
   - __traceback_info__: plone.app.registry
  Module plone.app.registry.exportimport.handler, line 79, in importRegistry
   - __traceback_info__: registry/mosaic.xml
  Module plone.app.registry.exportimport.handler, line 127, in importDocument
  Module plone.app.registry.exportimport.handler, line 343, in importRecords
KeyError: u"A <records /> node must have an 'interface' attribute."

Question: What is the right Interface ?

The Definition via XML should be:

<?xml version='1.0' encoding='UTF-8'?>
<registry>
  <records prefix="plone.defaultSiteLayout" interface="....????...">
    <value>++sitelayout++mytheme/singlepage.html</value>
  </records>
</registry>
petschki commented 10 months ago

Hm ... this is odd. There is an Interface IBlocksSettings but it doesn' have these attributes defaultSiteLayout and defaultAjaxLayout ... so you're not able to set these via genericsetup. This should be refactored definitely.