Js on entry page fails with "Cannot read property 'textContent' of null"
Closed this issue · 3 comments
seo-field.js:157
Uncaught TypeError: Cannot read property 'textContent' of null
The requested preview renders without errors. It looks like the data won't show up in the iframe seo-field.js:500
.
I've been unable to re-create this, could you let me know what fields you have and any other plugins that you are using?
I did some more testing and it seems that it calls twice on every change, while i have just 1 SEO field. The only other types i use are supertable and defaultcolor.
Since 1.1.1 the error is gone. seo-fields.js
calls SeoField.GetEntryHTML.prototype.update
twice on every change with alternating results (all calls succeed).
This results in either:
https://github.com/ethercreative/seo/blob/v1.1.1/resources/js/seo-field.js#L509
or
https://github.com/ethercreative/seo/blob/v1.1.1/resources/js/seo-field.js#L511
Note: data is as expected on https://github.com/ethercreative/seo/blob/v1.1.1/resources/js/seo-field.js#L505