Hi everybody. I'm dealing with directory entries that are composed by
several schemas and layouts. Within those layouts there are some
CPSStringWidgets, and I have found a wrong behavior when a 'None' value
is passed to the widget and this try to render it.
Could it be a coding error in teh widget? and so it is needed to treat
the None value inthe CPSWStringWidget (maybe returning the empty string,
or capturing the thrown exception?)
or maybe, could it be a configuration error of my own instance?
Any help will be welcome.
Thanks!
This is the error trace:
/2007-05-04 08:24:31 ERROR Zope.SiteErrorLog_
http://lolcalhost:8000/portalmir/cpsdirectory_entry_view _
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 195, in _exec
Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
Module Products.PageTemplates.PageTemplate, line 104, in pt_render
- <FSPageTemplate at /portalmir/cpsdirectory_entry_view>
Module TAL.TALInterpreter, line 238, in __call__
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 749, in do_useMacro
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 715, in do_condition
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 749, in do_useMacro
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 647, in do_insertStructure_tal
Module Products.PageTemplates.TALES, line 221, in evaluate
- URL:
file:IAVSkins/skins/iavskins_default/cpsskins_main_template_iavante_macroless
.pt
- Line 51, Column 4
- Expression: <PythonExpr page_container.render(shield=shield,
context_obj=context_o bj, enable_esi=enable_esi, theme=current_theme,
page=current_page, tableless=tableless, template=template,
options=options)>
- Names:
{'container': <CPSDefaultSite at /portalmir>,
'context': <CPSDefaultSite at /portalmir>,
'default': <Products.PageTemplates.TALES.Default instance at
0x2aaaafb2a908>,
'here': <CPSDefaultSite at /portalmir>,
'loop': <Products.PageTemplates.TALES.SafeMapping object at
0x2aaab40001b8>,
'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance a t
0x2aaaafb2aab8>,
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.TALES.SafeMapping object at
0x2aaab40001b8>,
'request': <HTTPRequest,
URL=//_http://lolcalhost:8000/portalmir/cpsdirectory_entry_view _//>,
'root': <Application at >,
'template': <FSPageTemplate at /portalmir/cpsdirectory_entry_view>,
'traverse_subpath': [],
'user': <User 'miguel.sanchez'>}
Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
- __traceback_info__: page_container.render(shield=shield,
context_obj=context_obj, enable_esi=enable_esi, theme=current_theme,
page=current_page, tableless=tableless,temp late=template, options=options)
Module Python expression "page_container.render(shield=shield,
context_obj=context_ob j, enable_esi=enable_esi, theme=current_theme,
page=current_page, tableless=tableless,t emplate=template,
options=options)", line 1, in <expression>
Module Products.CPSSkins.ThemePage, line 289, in render
Module Products.CPSSkins.PageBlock, line 225, in render
Module Products.IAVSkins.PageBlockPatch, line 136, in _renderTable
Module Products.CPSSkins.PortalBoxGroup, line 315, in render_cache
Module Products.CPSSkins.PortalBoxGroup, line 259, in render
Module Products.CPSPortlets.CPSPortlet, line 495, in render_cache
Module Products.CPSDocument.CPSDocument, line 68, in render
Module Products.CPSDocument.FlexibleTypeInformation, line 753, in
renderObject
Module Products.CPSDocument.FlexibleTypeInformation, line 715, in
_renderLayouts
Module Products.CPSSchemas.Layout, line 391, in renderLayoutStructure
Module Products.CPSSchemas.BasicWidgets, line 2135, in render
Module Products.CPSPortlets.PortletWidgets.MainContentWidget, line 27,
in renderMainC ontent
Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
Module Products.PageTemplates.PageTemplate, line 104, in pt_render
- <FSPageTemplate at /portalmir/cpsdirectory_entry_view>
Module TAL.TALInterpreter, line 238, in __call__
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 749, in do_useMacro
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 772, in do_defineSlot
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 507, in do_setLocal_tal
Module Products.PageTemplates.TALES, line 221, in evaluate
- URL: file:CPSDirectory/skins/cps_directory/cpsdirectory_entry_view.pt
- Line 25, Column 2
- Expression: <PythonExpr dir.renderEntryDetailed(id)>
- Names:
{'container': <CPSDefaultSite at /portalmir>,
'context': <CPSDefaultSite at /portalmir>,
'default': <Products.PageTemplates.TALES.Default instance at
0x2aaaafb2a908>,
'here': <CPSDefaultSite at /portalmir>,
'loop': <Products.PageTemplates.TALES.SafeMapping object at
0x2aaab5f6f1b8>,
'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance a t
0x2aaaafb2aab8>,
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.TALES.SafeMapping object at
0x2aaab5f6f1b8>,
'request': <HTTPRequest,
URL=//_http://lolcalhost:8000/portalmir/cpsdirectory_entry_view _//>,
'root': <Application at >,
'template': <FSPageTemplate at /portalmir/cpsdirectory_entry_view>}
Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
- __traceback_info__: dir.renderEntryDetailed(id)
Module Python expression "dir.renderEntryDetailed(id)", line 1, in
<expression>
Module Products.CPSDirectory.BaseDirectory, line 574, in
renderEntryDetailed
Module Products.CPSDirectory.BaseDirectory, line 946, in _renderLayout
Module Products.CPSSchemas.Layout, line 391, in renderLayoutStructure
Module Products.CPSSchemas.BasicWidgets, line 2127, in render
Module Products.CPSSchemas.BasicWidgets, line 276, in render
Module cgi, line 1039, in escape
AttributeError: 'NoneType' object has no attribute 'replace' /
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel