smcmahon / Products.PloneFormGen

PloneFormGen add on for Plone
http://plone.org/products/ploneformgen
Other
31 stars 76 forks source link

DateField, TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' #67

Open ccrownhart opened 11 years ago

ccrownhart commented 11 years ago

I'm migrating a site from 3.3.6 to 4.2.4, and they use PFG (1.5.2). I tried using both 1.7.6 and 1.7.7 in the new site, but in both cases, I get this traceback:

... Module zope.tales.tales, line 696, in evaluate URL: file:/usr/local/zope/buildout-cache/eggs/Products.CMFPlone-4.2.4-py2.7.egg/Products/CMFPlone/skins/plone_templates/calendar_macros.pt Line 12, Column 4 Expression: <PythonExpr date_components_support_view.result(inputvalue, 0, starting_year, ending_year, future_years, minute_step)> Names: {'container': <PloneSite at /main>, 'context': <FormFolder at /main/meetings/inquiry>, 'default': <object object at 0xb7ed7800>, 'here': <FormFolder at /main/meetings/inquiry>, 'loop': {u'field': <Products.PageTemplates.Expressions.PathIterator object at 0xdd943ac>}, 'nothing': None, 'options': {'args': (), 'state': <Products.CMFFormController.ControllerState.ControllerState object at 0xee2f9cc>}, 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xecfecac>, 'request': <HTTPRequest, URL=http://localhost/main/meetings/inquiry/fg_base_view_p3>, 'root': , 'template': <FSControllerPageTemplate at /main/fg_base_view_p3 used for /main/meetings/inquiry>, 'traverse_subpath': [], 'user': <PropertiedUser 'xxxx'>} Module Products.PageTemplates.ZRPythonExpr, line 48, in call traceback_info: date_components_support_view.result(inputvalue, 0, starting_year, ending_year, future_years, minute_step) Module PythonExpr, line 1, in Module plone.app.form.widgets.datecomponents, line 195, in result TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

I am able to add a new PFG form in this new instance and add a DateField without a problem. Seems like it could be related to the migration.

afrepues commented 11 years ago

Pinning Products.Archetypes to 1.8.7 fixes this, as it includes plone/Products.Archetypes@9b77e20c19.

This problem was introduced in 1.8.5 with plone/Products.Archetypes@d7cfa127d5575249aec564c4342d9bab302958d.