JS error in stream.js when attempting to add content with StreamField
See original GitHub issueHi folks.
Are there any known issues with the JS for StreamField? I’ve created a custom StreamBlock by extending blocks.StreamBlock, and when used with a StreamField on a simple page model, I get the initial menu to a allow a block type to be selected (along with correct icons and labels), but selecting any block to begin adding content raises a JS error 😦
The Chrome console is telling me that the error is occuring at line 75 of stream.js:
Uncaught TypeError: Cannot read property 'initializer' of undefined
I’ve tried with a much simpler StreamBlock definition too (with just a couple of CharBlocks), but the error is still happening.
Possibly related… I’m also seeing a JS warning from line 11 of rangy-core.js:
'Range.detach' is now a no-op, as per DOM (http://dom.spec.whatwg.org/#dom-range-detach).
It could well be to do with my implementation, but this is my first Wagtail project, and the setup is all pretty vanilla. Any help would be greatly appreciated!
Thanks, Andy
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Yeah me too, @timheap @ababic a sanity check/warning on this would be nice huh?
My apologies @gasman. It seems that the error was occuring because I was using FieldPanel to represent the field in content_panels, rather than the newly introduced StreamFieldPanel.
Thank you for getting back to me, though. Much appreciated!