collective / collective.easyform

Forms for Plone
https://pypi.org/project/collective.easyform
13 stars 29 forks source link

on plone6 branch, action "required" bool field cannot be set, thus no action is performed #313

Closed yurj closed 2 years ago

yurj commented 2 years ago

Hi!

how to reproduce:

install easyform branch plone6 add a form go in the action try to enable the mailer action flagging it and saving the action is not flagged, thus does not run when sending the email.

I don't know if it is related to some bool field changes but it worked a couple of weeks ago.

yurj commented 2 years ago

I can fix it using @@actions/@@modeleditor and adding <required>True</required> If you save it again using the actions view, it will be lost and thus you're to set it again.

yurj commented 2 years ago

I've found it is the same schema of the action itself, so also editing the action will erase it. It is like the required field it is not in the schema. I can see it just in the action init, where it is set to False but the field itself is not declared anywhere, at least with my limited knowledge in schema/forms/supermodel or whatever it is.

frapell commented 2 years ago

Hitting the same issue on my side when trying this in Plone 6. Not sure what's the proper fix

yurj commented 2 years ago

@jensens @mauritsvanrees maybe some changes on boolean/checkbox handling (z3c.form?)?

mauritsvanrees commented 2 years ago

This looks like a bug that was fixed in latest zope.schema. Are you using that?

I expect this to work with Plone 6.0.0a2.

frapell commented 2 years ago

@mauritsvanrees Yup, I can confirm https://github.com/zopefoundation/zope.schema/pull/107 does fix the issue with easyform...

nice butterfly effect ;)

yurj commented 2 years ago

This looks like a bug that was fixed in latest zope.schema. Are you using that?

I expect this to work with Plone 6.0.0a2.

I'm using Plone 6.0.0a2 with zope.schema 6.1.0 the fix is in zope.schema 6.1.1.

petschki commented 2 years ago

This can be closed as solved with updated zope.schema

frapell commented 2 years ago

@petschki I was thinking maybe we want to pin zope.schema >= 6.1.1 in setup.py ?