[Usuarios Plone] Crear portadas cover usando plantilla layout desde policy product

Leonardo Caballero leonardocaballero at gmail.com
Mon Sep 21 11:58:58 UTC 2015


Hola Plonistas

Estoy creando una portada de mi home con el producto collective.cover
usando plantilla layout creada desde el c.cover y registrada via
registry.xml en GenericSetup en un policy product y al construir me da este
error:

2015-09-21 07:06:21 DEBUG collective.cover cover_layout attribute was empty
2015-09-21 07:06:21 DEBUG collective.cover cover_layout attribute was empty
2015-09-21 07:06:21 INFO acaeslanoticia.policy Limpiado y construido de
nuevo el catalogo!
2015-09-21 07:06:21 INFO GenericSetup.actions Actions tool imported.
2015-09-21 07:06:21 INFO GenericSetup.archetypetool Archetype tool imported.
2015-09-21 07:06:21 INFO GenericSetup.browserlayer Browser layers imported
2015-09-21 07:06:21 DEBUG GenericSetup.action-icons Nothing to import.
2015-09-21 07:06:21 INFO GenericSetup.contentrules Content rules imported
2015-09-21 07:06:21 INFO GenericSetup.portlets Portlets imported
2015-09-21 07:06:21 DEBUG GenericSetup.various-calendar Nothing to import.
2015-09-21 07:06:21 DEBUG GenericSetup.cookies Nothing to import.
2015-09-21 07:06:22 DEBUG ZODB.Connection Committing savepoints of size
28420154
2015-09-21 07:06:23 DEBUG txn.-1244382352 commit <Connection at 0a8a186c>
2015-09-21 07:06:23 DEBUG txn.-1244382352 commit
2015-09-21 07:06:23 DEBUG txn.-1244382352 new transaction
2015-09-21 07:06:23 DEBUG txn.-1244382352 abort
2015-09-21 07:06:23 DEBUG txn.-1244382352 new transaction
2015-09-21 07:06:23 DEBUG plone.dexterity.utils getAdditionalSchemata with
context <Cover at /portal/portada> and portal_type None
2015-09-21 07:06:23 DEBUG plone.dexterity.utils Behavior assignable found
for context.
2015-09-21 07:06:23 ERROR Zope.SiteErrorLog 1442835383.950.188945280547
http://localhost:8080/portal/portada/view
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
  Module ZPublisher.Publish, line 48, in call_object
  Module grokcore.view.components, line 150, in __call__
  Module grokcore.view.components, line 154, in _render_template
  Module five.grok.components, line 130, in render
  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 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 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 858, in do_defineMacro
  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 946, 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 218, in evaluateStructure
  Module zope.tales.tales, line 696, in evaluate
   - URL:
/home/macagua/.buildout/eggs/collective.cover-1.0a9-py2.7.egg/collective/cover/browser/templates/
view.pt
   - Line 12, Column 4
   - Expression: <PathExpr standard:u'layout/render_view'>
   - Names:
      {'args': (),
       'container': <Cover at /portal/portada>,
       'context': <Cover at /portal/portada>,
       'default': <object object at 0xb757e6b0>,
       'here': <Cover at /portal/portada>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at
0xefa98ec>,
       'request': <HTTPRequest, URL=
http://localhost:8080/portal/portada/view>,
       'root': <Application at >,
       'static': None,
       'template':
<Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at
0xdb604ec>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <collective.cover.browser.cover.View object at 0xeea662c>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object
at 0xeea6dcc>}
  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 collective.cover.layout, line 126, in render_view
  Module zope.browserpage.viewpagetemplatefile, line 83, in __call__
  Module zope.browserpage.viewpagetemplatefile, line 51, 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 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 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 819, in do_loop_tal
  Module zope.tales.tales, line 682, in setRepeat
  Module zope.tales.tales, line 696, in evaluate
   - URL:
/home/macagua/.buildout/eggs/collective.cover-1.0a9-py2.7.egg/collective/cover/layout_templates/
pagelayout.pt
   - Line 11, Column 8
   - Expression: <PythonExpr (view.get_layout(mode))>
   - Names:
      {'args': (),
       'context': <Cover at /portal/portada>,
       'default': <object object at 0xb757e6b0>,
       'loop': {},
       'nothing': None,
       'options': {'mode': 'view'},
       'repeat': {},
       'request': <HTTPRequest, URL=
http://localhost:8080/portal/portada/view>,
       'template':
<zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile object at
0xe11670c>,
       'view': <collective.cover.layout.PageLayout object at 0xb401cd2c>,
       'views': <zope.browserpage.viewpagetemplatefile.ViewMapper object at
0xb3fbc72c>}
  Module zope.tales.pythonexpr, line 59, in __call__
   - __traceback_info__: (view.get_layout(mode))
  Module <string>, line 1, in <module>
  Module collective.cover.layout, line 35, in get_layout
  Module json, line 326, in loads
  Module json.decoder, line 365, in decode
TypeError: expected string or buffer
> /usr/lib/python2.7/json/decoder.py(365)decode()
    364         """
--> 365         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    366         end = _w(s, end).end()

ipdb>

Alguna idea de que me esta fallando?

El archivo registry.xml
https://github.com/acaeslanoticia/acaeslanoticia.policy/blob/master/acaeslanoticia/policy/profiles/default/registry.xml

El archivo donde defino la estructura de contenido del sitio
https://github.com/acaeslanoticia/acaeslanoticia.policy/blob/master/acaeslanoticia/policy/config.py#L117

El archivo setuphandlers.py donde defino la función que construye la
estructura de contenidos definidas en SITE_STRUCTURE dentro del archivo
config.py
https://github.com/acaeslanoticia/acaeslanoticia.policy/blob/master/acaeslanoticia/policy/setuphandlers.py#L125

Alguna idea de como resolver esto?

-- 
Atentamente

Ing. Leonardo  J. Caballero G.
Linux Counter ID = https://linuxcounter.net/user/369081.html
------------ pr�xima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.plone.org/pipermail/plone-usuarios-plone/attachments/20150921/34bac06e/attachment.html>


More information about the Usuarios-Plone mailing list