formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

Content Component Error

Open du8die opened this issue 7 years ago • 9 comments

For some reason, out of the blue this error started showing up in the content component.

TypeError: Cannot read property 'initialData' of null at classiceditor.js:204

Using the //unpkg.com/formiojs@latest/dist/formio.full.min.js as source.

This just started happening.

Thoughts?

du8die avatar May 17 '19 16:05 du8die

Can you try and see if this issue is occurring on the 3.20.15?

We are able to replicate this issue on the latest version of formio.js. We have created a ticket and have added this to our backlog. We will let you know when this item is resolved.

Thanks.

wag110894 avatar May 17 '19 22:05 wag110894

Yep, it's occuring in 3.20.15 as well.

mattwltr avatar May 20 '19 14:05 mattwltr

This problem appeared all of a sudden in a PC having release 3.10.0. Given that this an old release with no no form.io code changes, how could this issue appear in a form which was working perfectly just a few days ago? Maybe I am missing something... Many thanks.

karamanos avatar May 20 '19 16:05 karamanos

@karamanos as far as I debugged the problem it seems that not formio.js is causing the problem but ckeditor itself. It looks like formio.js is loading the editor from https://cdn.staticaly.com/gh/formio/ckeditor5-build-classic/master/build/ckeditor.js which might have changed a few days ago. I hope this will be fixed soon.

mattwltr avatar May 20 '19 16:05 mattwltr

@mattwltr It makes sense, many thanks

karamanos avatar May 20 '19 17:05 karamanos

Do a search for https://cdn.staticaly.com/gh/formio/ckeditor5-build-classic/master/build/ckeditor.js and replace the /master/ with /stable/ - worked for me.

https://cdn.staticaly.com/gh/formio/ckeditor5-build-classic/stable/build/ckeditor.js

CoreNetJC avatar May 22 '19 00:05 CoreNetJC

We recently updated the base version of the CKEditor. It apparently does not like NULL being passed to the options.

https://github.com/formio/formio.js/blob/master/src/components/base/Base.js#L1969

I believe the solution here is to change this line to say

settings = _.isEmpty(settings) ? {} : settings;

can I get confirmation that this works? If so, then we can submit a pull request to fix this very soon.

travist avatar May 22 '19 18:05 travist

Working great for me @travist and much better than my hack. :) Thanks!

CoreNetJC avatar May 23 '19 17:05 CoreNetJC

This was resolved in the latest version of the renderer.

travist avatar Jun 03 '19 20:06 travist