Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failures with changed repeat syntax newer Zope/chameleon #94

Closed
mauritsvanrees opened this issue Aug 21, 2020 · 2 comments · Fixed by #96
Closed

Failures with changed repeat syntax newer Zope/chameleon #94

mauritsvanrees opened this issue Aug 21, 2020 · 2 comments · Fixed by #96
Labels

Comments

@mauritsvanrees
Copy link
Member

In Zope/templates/chameleon the repeat syntax has changed slightly. Apparently previously you had to call repeat['widget'].index() to get the index number, but now you directly get the integer without needing to call it.
See plone/plone.app.z3cform#116 for such a failure in plone.app.z3cform in a template that overrides a base template in z3c.form. And see plone/plone.app.z3cform#117 for the fix.

The base template in z3c.form has the same problem, as do several other templates:

$ ack repeat | ack index
browser/multi_hidden.pt:6:        define="key_widget python:view.key_widgets[repeat['widget'].index()];">
browser/multi_display.pt:25:         tal:define="key_widget python:view.key_widgets[repeat['widget'].index()];"
browser/multi_input.pt:12:         tal:define="key_widget python:view.key_widgets[repeat['widget'].index()];">

This is in z3c.form 3.7.0.
I have no time right now to fix it, only to create an issue.

@d-maurer
Copy link
Contributor

d-maurer commented Aug 22, 2020 via email

@mauritsvanrees
Copy link
Member Author

Thanks for your reaction.

That code is how I solve it too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants