143
Views
4
Comments
Solved
[CKEditor.Reactive] Cannot set properties of null (setting 'InnerHTML'). How to fix this error?
ckeditor-reactive
Reactive icon
Forge asset by Fábio Fantato
Application Type
Reactive

In our application we constantly get an error, named: "Cannot set properties of null (setting 'InnerHTML')".


In our application we have a client action where we make use of the SetContainerHTML client action of the Forge Asset CKEditor.Reactive:



This is what the SetContainerHTML client action in the Forge Asset CKEditor.Reactive looks like with the innerHTML in the javaScript:


Can someone please help and tell us why we get this error and how we have to solve it?

2019-10-24 21-01-44
Jay Parnau
Staff
Solution

Possibly a JS load order issue, which is common with that component. 

You can test by putting a button on the screen, calling the action from there, and see if you get the same error.

If you don't, best bet is to set up a JS timeout to give it a few hundred MS for the scripts to complete before calling the action.

2019-10-24 21-01-44
Jay Parnau
Staff

Where is GetRandomQuestion called from? (ex OnReady)?

UserImage.jpg
Andy Asri

GetRandomQuestion is a client action we made ourselves in one of our screens of our own application. In this client action we make use of SetContainerHTML (as you can see in one of our screenshots). 

2019-10-24 21-01-44
Jay Parnau
Staff
Solution

Possibly a JS load order issue, which is common with that component. 

You can test by putting a button on the screen, calling the action from there, and see if you get the same error.

If you don't, best bet is to set up a JS timeout to give it a few hundred MS for the scripts to complete before calling the action.

UserImage.jpg
Nani

If the html variable is null don't trigger the client action (SetContainerHTML)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.