CalendarWidget is broken on Plone 4.2.4 + PloneFormGen

I am migrating a site from 4.0.9 to 4.2.4. I have a PloneFormGen form that has a date field and it breaks when rendering that field in the view. In this case, the associated CalendarWidget.

The violation code was added here https://github.com/plone/Products.CMFPlone/commit/5044d9159be33464ca8f79193af97d2822e833f9

The string is minute_step minute_step | python: 5;

not evaluating properly and I am getting

  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 <expression>
  Module plone.app.form.widgets.datecomponents, line 195, in result
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

      

whereas the meaning NoneType

comes from minute_step

.

Changing this line to minute_step python: minute_step or 5;

makes it work again.

Am I the only one who experimented with this?

+3


source to share


1 answer


You are not the only one. This is fixed for master of Products.Archetypes to provide a default value: https://github.com/plone/Products.Archetypes/blob/master/CHANGES.txt



Ask to free or run from a clone of the repo.

+2


source







All Articles