I have just run into two seemingly related situations where values in a datagrid result in Plone errors.
Situation 1. a date field in the nested schema leads to
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 167, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 376, in publish_module
Module ZPublisher.WSGIPublisher, line 271, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 68, in call_object
Module pnz.erpediem.core.browser.customer, line 50, in __call__
Module plone.autoform.view, line 40, in __call__
Module plone.autoform.view, line 62, in _update
Module z3c.form.group, line 52, in update
Module z3c.form.group, line 48, in updateWidgets
Module z3c.form.field, line 274, in update
Module z3c.form.browser.multi, line 63, in update
Module z3c.form.browser.widget, line 171, in update
Module z3c.form.widget, line 510, in update
Module Products.CMFPlone.patches.z3c_form, line 46, in _wrapped
Module z3c.form.widget, line 132, in update
Module z3c.form.widget, line 505, in value
Module collective.z3cform.datagridfield.datagridfield, line 149, in updateWidgets
Module z3c.form.widget, line 447, in updateWidgets
Module z3c.form.widget, line 396, in applyValue
Module z3c.form.object, line 119, in toFieldValue
Module plone.app.z3cform.converters, line 69, in toFieldValue
AttributeError: 'datetime.date' object has no attribute 'split'
Situation 2. looking up a token in a vocabulary leads to
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 167, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 376, in publish_module
Module ZPublisher.WSGIPublisher, line 271, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 68, in call_object
Module pnz.erpediem.core.browser.remadv, line 48, in __call__
Module plone.autoform.view, line 40, in __call__
Module plone.autoform.view, line 62, in _update
Module z3c.form.group, line 52, in update
Module z3c.form.group, line 48, in updateWidgets
Module z3c.form.field, line 274, in update
Module z3c.form.browser.multi, line 63, in update
Module z3c.form.browser.widget, line 171, in update
Module z3c.form.widget, line 510, in update
Module Products.CMFPlone.patches.z3c_form, line 46, in _wrapped
Module z3c.form.widget, line 132, in update
Module z3c.form.widget, line 505, in value
Module collective.z3cform.datagridfield.datagridfield, line 149, in updateWidgets
Module z3c.form.widget, line 447, in updateWidgets
Module z3c.form.widget, line 396, in applyValue
Module z3c.form.object, line 119, in toFieldValue
Module z3c.form.converter, line 306, in toFieldValue
Module z3c.form.term, line 41, in getValue
Module z3c.form.term, line 188, in getTermByToken
LookupError: 3
In the first case, I originally chalked it up to my own fault when reading
and made my object return a string.
However, in the second case, the term lookup fails to find '3' - rather than '380' (for an EDI Invoice)
I dove into the z3c.form rabbithole... By commenting out and adding fvalue=value
in
My page displays as intended. Both the date field and the vocabulary lookup now work.
But this is of course not a viable solution...
I could really use some assistance from the community to find the source of the problem. Please help?
Norbert