-
Notifications
You must be signed in to change notification settings - Fork 86
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
Creating a BootstrapRowPlugin fails because of incorrect empty_form
value
#390
Comments
OK. I will have a look at it. |
Is there any update to this? I can try to create a PR, but I'm not sure I understand the details of |
Same problem here. Any updates? |
@Xiphoseer Just one additional question: Did you create your own plugin with its own form, or did you use the |
We did create our own djangocms-cascade plugins (here) but none of them change, override or derive from I made sure to verify this behavior on a page without any of our custom plugins before filing this bug. |
But I absolutely agree, that I should not render an "Empty form message", if there are any |
Could you please retry with the latest version from this repository. |
When trying to create Bootstrap 4
Row
plugins, we ran into an issue where no settings were displayed in the creation form, but the creation failed with an error that told us to fix one of the settings.After some investigation, I found that the
num_columns
field from the form was missing from the request and that there's a weirdform_empty
context value in templates/cascade/admin/change_form.html.It turns out that for a form that doesn't use any
django-entangled
fields, this line inplugin_base.py
sets that value but ignores anyuntangled_fields
that may be present. Thus, no form fields appear in the admin view and consequently aren't included in the request to the server.I would personally consider values like
empty_form
to be an anti-pattern, because they produce hard-to-debug cases like this one, but I appreciate that the intent is to inform the user that this form is intentionally blank if it were to work correctly.The text was updated successfully, but these errors were encountered: