I’m trying to populate a rich-text field from an existing database, using the contentful_converter
gem to translate the HTML to Contentful JSON. This doesn’t raise any errors when sending the data to Contentful (we’re using raise_errors: true
). In some cases the page renders fine in the Contentful editor, but in other cases I’m getting the following error in the browser instead of the Rich Text editor:
⚠️ Something went wrong. This field editor is broken. Reach out to support.
Digging into the console logs, the only relevant error appears to be:
Error: Cannot get the start point in the node at path [8] because it has no start text node.
Obviously it’s rubbish if content editors can’t see what’s in the data to view it: any suggestions?