You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
When you add your own "name" on fields and you have 2 fields with the same name, a internal server error (KeyError) occurs.
End of trace:
File "/usr/local/lib/python3.6/site-packages/cms/plugin_rendering.py", line 429, in render_plugin
context = plugin.render(context, instance, placeholder.slot)
File "/usr/local/lib/python3.6/site-packages/aldryn_forms/cms_plugins.py", line 385, in render
field_name = form_plugin.get_form_field_name(field=instance)
File "/usr/local/lib/python3.6/site-packages/aldryn_forms/models.py", line 289, in get_form_field_name
return self._form_field_key_cache[field.pk]
Problem:
in FieldPlugin.get_form_field_name() the function "get_form_fields_by_name()" gets called and returns a ordered dict with "(field.name, field)", where the duplicated fields are getting lost because the previous key-value-pair with the exact same "name" gets overwritten.
That said, is there a possible solution to prevent filling in duplicated "name"s for fields or maybe to just prevent a server error and print out something like "this field has a duplicated name, change it"?
The text was updated successfully, but these errors were encountered:
When you add your own "name" on fields and you have 2 fields with the same name, a internal server error (KeyError) occurs.
End of trace:
Problem:
in FieldPlugin.get_form_field_name() the function "get_form_fields_by_name()" gets called and returns a ordered dict with "(field.name, field)", where the duplicated fields are getting lost because the previous key-value-pair with the exact same "name" gets overwritten.
That said, is there a possible solution to prevent filling in duplicated "name"s for fields or maybe to just prevent a server error and print out something like "this field has a duplicated name, change it"?
The text was updated successfully, but these errors were encountered: