plone - 'LocationError' on custom field after using a custom importer to import some dexterity based content types -
i've created importer custom dexterity content type. imports types fine, 'locationerror' when try view newly imported content following traceback:
traceback (innermost last): module zpublisher.publish, line 60, in publish module zpublisher.mapply, line 77, in mapply module zpublisher.publish, line 46, in call_object module grokcore.view.components, line 140, in __call__ module grokcore.view.components, line 144, 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 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 858, in do_definemacro 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 742, in do_insertstructure_tal module products.pagetemplates.expressions, line 218, in evaluatestructure module zope.tales.tales, line 696, in evaluate - url: /home/action/workspace/zeocluster/src/collective.nonprofitprogrammes/collective/nonprofitprogrammes/programme_templates/programmeview.pt - line 20, column 8 - expression: <pathexpr standard:u'context/background/output'> - names: {'args': (), 'container': <programme @ /plone2/my-content/dry-forest-conservation-programme>, 'context': <programme @ /plone2/my-content/dry-forest-conservation-programme>, 'default': <object object @ 0x7f60dda304e0>, 'here': <programme @ /plone2/my-content/dry-forest-conservation-programme>, 'loop': {}, 'nothing': none, 'options': {}, 'repeat': <products.pagetemplates.expressions.safemapping object @ 0x7f60cc0673c0>, 'request': <httprequest, url=http://mybox-23772.use1.actionbox.io:8080/plone2/my-content/dry-forest-conservation-programme/programmeview>, 'root': <application @ >, 'static': <products.five.metaclass.directoryresource12 object @ 0x7f60cc073ed0>, 'template': <products.five.browser.pagetemplatefile.viewpagetemplatefile object @ 0x8ee7550>, 'traverse_subpath': [], 'user': <propertieduser 'admin'>, 'view': <collective.nonprofitprogrammes.programme.programmeview object @ 0x7f60cc073bd0>, 'views': <products.five.browser.pagetemplatefile.viewmapper object @ 0x7f60cc073c10>} module zope.tales.expressions, line 217, in __call__ module products.pagetemplates.expressions, line 147, in _eval module zope.tales.expressions, line 124, in _eval module products.pagetemplates.expressions, line 97, in trustedboboawarezopetraverse module zope.traversing.adapters, line 136, in traversepathelement - __traceback_info__: (u'jam...ation.\n', 'output', []) locationerror: (u'jam...ation.\n', 'output')
interestingly visiting url of content type followed /edit works , after saving changes view works.
the "output" portion of locationerror message suggests having trouble rendering richtext field. possible initialized richtext field other richtextvalue?
you cannot assign string richtext field. requires richtextvalue:
from plone.app.textfield.value import richtextvalue context.body = richtextvalue(u"your text here, in html")
see dexterity developer's manual section on richtextvalue details. allows set input , output mime types text.
Comments
Post a Comment