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

Fixed repeat syntax in multi input to also work in Zope 4.5. #117

Merged
merged 1 commit into from
Aug 21, 2020

Conversation

mauritsvanrees
Copy link
Sponsor Member

I now use path expression index repeat/widget/index. When repeat/widget/index is callable, this will call it, otherwise you simply get the value. This should work in older and newer Zope.

Fixes #116

Strangely, in my case after this I get a different error:

   - __traceback_info__: (view.key_widgets[index])
  Module <string>, line 1, in <module>
IndexError: list index out of range

When I check, view.key_widgets (in z3c.form) is an empty list. So there is more going on here, but this seems specific to my form.
But the fix should be good.

Note that this template is an override for a template in z3c.form, where it has the same problem, just like a few other templates.

@mister-roboto

This comment has been minimized.

@mauritsvanrees
Copy link
Sponsor Member Author

@jenkins-plone-org please run jobs

@jensens jensens merged commit 39f0c7f into master Aug 21, 2020
@jensens
Copy link
Sponsor Member

jensens commented Aug 21, 2020

nice catch :/

@jensens jensens deleted the maurits/issue-116-multi-input-repeat-index branch August 21, 2020 14:02
@petri
Copy link
Member

petri commented Oct 15, 2020

@mauritsvanrees I appear to have the exact same issue as you. On Plone 5.2.2, Python 3.7.3 on MacOS. My form is using the datagridfield. Strangely enough, it was working first, I have no idea what triggered the issue in #116. After upgrade to 3.2.2 I see the IndexError: list index out of range as well.

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

Successfully merging this pull request may close these issues.

Plone 5.2.2: error with repeat syntax in multi_input.pt
4 participants