-
Notifications
You must be signed in to change notification settings - Fork 15
RichTextField crashes with inline formsets | Unfold Admin #100
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
Comments
A few insites here. This issue is caused by this particular line in Django1: row.find("*").each(function() {
updateElementIndex(this, options.prefix, totalForms.val());
}); and consequently by attempting to update the name2 of the returned elements: if (el.name) {
el.name = el.name.replace(id_regex, replacement);
} The The way I suggest to approach this is go into the django-prose/prose/static/prose/editor.js Lines 49 to 58 in a851498
and define a setter property6 for all Footnotes
|
Closed in #104. |
Description
We are experiencing a TypeError in the console when attempting to add an item to a stacked inline in the Django admin. The issue occurs because the model for the inline contains a RichTextField.
Steps to Reproduce
Expected Behavior
A new inline form should be added without any errors.
Actual Behavior
A TypeError is thrown in the console, and the new inline form is not added.
Environment
OS: macOS 14.2
Django Version: 5.0.6
Django Unfold: 0.20.5
Django Prose: 2.0.0
Additional Context
The specific project uses Django unfold admin to override the theme.
This issue appears to be related to the integration of the RichTextField within the stacked inline. The problem does not occur with inlines that do not contain a RichTextField.
It seems that the error occurs when the
inlines.js
script tries to update the name property fortrix-editor
, probably because it expects an input element, and fails because there is none.The text was updated successfully, but these errors were encountered: