Open Xiphoseer opened 3 years ago
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 django-entangled
enough for that.
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 BootstrapRowPlugin
as provided by djangocms-cascade?
@Xiphoseer Just one additional question: Did you create your own plugin with its own form, or did you use the
BootstrapRowPlugin
as provided by djangocms-cascade?
We did create our own djangocms-cascade plugins (here) but none of them change, override or derive from BootstrapRowPlugin
. So as far as I can tell, we used the BootstrapRowPlugin
as provided.
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 untangled_fields
in the form's Meta
class. This should be fixed.
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.