Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setReadOnly() breaking page and throwing popup error #59

Open
threadinghamt opened this issue May 3, 2018 · 1 comment
Open

setReadOnly() breaking page and throwing popup error #59

threadinghamt opened this issue May 3, 2018 · 1 comment

Comments

@threadinghamt
Copy link

Hi.
I am using the editor and the viewer in an app version Mx7.13. I have a few places I am using the editor, but one particular instance of it keeps throwing an error from the _updateRendering() function call. This can be found in the CKEditorForMendix.js and within this is the following line of code
this._editor.setReadOnly(this._strReadOnly());
I cannot work out why the error is thrown from the one particular instance of the widget and can only put it down to the way it is embedded within other objects. Currently it resides within a groupbox within a dataview that is a listener to a datagrid. I have checked to ensure the attribute has access rights and debugged through but to no avail. I also don't quite know why there is the readonly setting within the code for the editor when the viewer is also available. there is also no ability to change this via the parameters.
The error being thrown is pasted below.
I am currently resolving the issue by having commented the breaking line of code as I cannot work out a graceful way of preventing it. I have not encountered any other problems whilst this code is disabled.

Error: mxui_widget_GroupBox_2.applyContext: Error: mxui_widget_GroupBox_2.applyContext: Error: CKEditorForMendix_widget_CKEditorForMendix_0.applyContext: Error: CKEditorForMendix_widget_CKEditorForMendix_0.applyContext: TypeError: Cannot read property 'setReadOnly' of undefined
at mxui.js?636609517612517442:1
at Object.e.exports.collect (mxui.js?636609517612517442:1)
at Object.e.exports.applyContext (mxui.js?636609517612517442:1)
at O.(:8080/anonymous function).E.passContext (http://localhost:8080/mxclientsystem/mxui/mxui.js?636609517612517442:1:148381)
at mxui.js?636609517612517442:1
at mxui.js?636609517612517442:1
at mxui.js?636609517612517442:1
at r (mxui.js?636609517612517442:1)
at mxui.js?636609517612517442:1
at o (mxui.js?636609517612517442:1)

@edwinvanelk
Copy link

We have run into a similar issue in 6.10.3 using CKEditor 2.4.7, where we receive the following error:

mxui.js:9 mendix.sys.Data.get: error in handler for 218424581927469159: CKEditorForMendix_widget_CKEditorForMendix_0.applyContext: Error: CKEditorForMendix_widget_CKEditorForMendix_0.applyContext: TypeError: Cannot read property 'setReadOnly' of undefined

Seems to be caused by applying conditional visibility to the groupbox that contains the CKEditor widget. After removing CV error is gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants