I'm running into an issue where the rich text editor crashes immediately when used inside of a chooser create form. I tried the following on a Wagtail Bakery install to see if it would reproduce outside of my codebase. I first tried 2.1.2 with Wagtail 6.5 and then I tried it again on version 3.0.0 with Wagtail 7.2 with the same result.
- I have a StreamField with a RichTextBlock containing 'ai' as a feature.
class BreadType(RevisionMixin, models.Model):
...
content = StreamField(
[
('paragraph', RichTextBlock(features=['bold', 'italic', 'link', 'ai']))
],
)
...
- I create a ChooserViewSet to create a custom chooser that includes a Create tab
class BreadTypeChooserViewSet(ChooserViewSet):
model = "breads.BreadType"
...
form_fields = ["title", "content"]
- When I open the Create tab the editor displays as crashed.
On 2.1.2/Wagtail 6.5, this was the error I saw:
installHook.js:1 Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at B (vendor.js?v=3ac49bd7:2:254968)
at t.useState (vendor.js?v=3ac49bd7:2:257234)
at inline (<anonymous>:1:3053)
at Zo (vendor.js?v=3ac49bd7:2:177614)
at Ts (vendor.js?v=3ac49bd7:2:223660)
at kl (vendor.js?v=3ac49bd7:2:216420)
at xl (vendor.js?v=3ac49bd7:2:216345)
at hl (vendor.js?v=3ac49bd7:2:213368)
at ul (vendor.js?v=3ac49bd7:2:210116)
at Gl (vendor.js?v=3ac49bd7:2:231374)
But on 3.0.0/Wagtail 7.2, I get this error instead:
installHook.js:1 Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=object&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at zl (vendor.js?v=cdda3890:2:191474)
at f (vendor.js?v=cdda3890:2:134939)
at m (vendor.js?v=cdda3890:2:136219)
at vendor.js?v=cdda3890:2:138282
at Fa (vendor.js?v=cdda3890:2:147720)
at xs (vendor.js?v=cdda3890:2:187827)
at Tl (vendor.js?v=cdda3890:2:178610)
at kl (vendor.js?v=cdda3890:2:178535)
at hl (vendor.js?v=cdda3890:2:175568)
at ul (vendor.js?v=cdda3890:2:172316)
I'm running into an issue where the rich text editor crashes immediately when used inside of a chooser create form. I tried the following on a Wagtail Bakery install to see if it would reproduce outside of my codebase. I first tried 2.1.2 with Wagtail 6.5 and then I tried it again on version 3.0.0 with Wagtail 7.2 with the same result.
On 2.1.2/Wagtail 6.5, this was the error I saw:
But on 3.0.0/Wagtail 7.2, I get this error instead: