question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JS error in stream.js when attempting to add content with StreamField

See original GitHub issue

Hi 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:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
litchfieldcommented, Dec 16, 2015

Yeah me too, @timheap @ababic a sanity check/warning on this would be nice huh?

10reactions
ababiccommented, Apr 20, 2015

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error handling with node.js streams - Stack Overflow
Use Node.js pattern by creating a Transform stream mechanics and calling its callback done with an argument in order to propagate the error:...
Read more >
How to use StreamField for mixed content
StreamField provides an HTML representation for the stream content as a whole, as well as for each individual block. To include this HTML...
Read more >
Stream field details - Splunk Documentation
Why am I receiving this error when I am trying to ... Getting A Specific Field From a Log · How to extract...
Read more >
wagtailcontentstream - PyPI
Wagtail Content Stream. An abstract Django model with a Wagtail StreamField named body with multiple blocks I use on a regular basis.
Read more >
SQL Error Messages | InterSystems IRIS Data Platform 2022.2
SQLCODE=100 indicates that the SQL operation was successful, but found no data to act upon. This can occur for a number of reasons....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found