-
Notifications
You must be signed in to change notification settings - Fork 21
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
Error: TypeError: Cannot read property '_destroyed' of undefined when pasting data #60
Comments
This is an issue with Microsoft Edge and Mendix 6/7. Upgrade to 6.10.13 or 7.16. See the releasenotes. Here's the same error on the forum I am closing the issue as it is not related to the widget. |
Before entering this issue I reproduced the issue in Mx 7.16.0 (build 36935) using the CKEditor 2.4.8 widget. Not using MS Edge, issue was reproduced using Chrome 67.0.3396.99. Issue might not be related to the widget, but problem is not yet solved in 7.16 |
After reading the forum post (Release notes do not show any details about the "Cannot read property '_destroyed' of undefined" error) it seems that some changes are made to the case of "widgetId" or "widgetid". But why does some pieces of HTML data which is shown/edited inside the CKEditor cause an error in the Mendix app? Shouldn't this data/htm/text be isolated from the Mendix app? |
Then it's an issue with the implementation of your html. What is the reason you add widgetid to the element? |
Jelte, widgetid gets added to the HTML because notes/data from another (Mendix) application are pasted in our (Mendix) application. We do not know where the source data is copied from exactly, but the source data seems to contain these Mendix widgetid's. |
Can you give me an example of what is pasted in there, plus how that is pasted? If this is done through an editor, you might want to apply some sanitation first (which in terms of XSS is a good idea regardless) We might have to add some sanitation client side, but ultimately this has to be done server side |
Hi Jelte, Data is copied (to Windows clipboard) from any of the screens from another Mendix application ans pasted directly in our application. No editor is involved, so user is not able to sanitize data. Complete copy of data that was pasted in CKEditor: 20-3 VN geprobeerd te bellen VM ingesproken met terugbelverzoek. Foto's van gevolgschade en type kast vragen. Omdat volgens OHRA vn het onderste uit de kan wil hebben, misschien een inspectie inplannen? AV 20-3 vn belde, inspectie gepland voor as vrijdag bij naam - achternaam
27-3: waterschade door gescheurde tegels in de badkamer ter plaatsen van de douche
afkoop van de schade van de linnen kast afkoop van de mogelijke schade aan het laminaat slaapkamer 13m2 Aangemaakt/aangepast door: geprobeerd VN te bereiken geen gehoor schade afkoop kast vergoeding 400 laminaat 350 euro afkoop gehele schade 750
Aangemaakt/aangepast door:
27-3: woningbouw gaat muur wel herstellen maar niet schilderen. Zij gaat het toch nog proberen en laat weten. Als wij moeten schilderen dan order uit en daarna schaderapport met afkoop 750 meenemen. Als woningbouw schildert dan schaderapport opstellen met afkoop 750 erin. SdV aanvullend gesprek gehad met Vn de woning bouw gaat verder net het schilderwerk van de wand herstellen de wand moet behandeld worden met schimmel doden middel dan isoleren en vervolgen sausen van de gehele wand 5 M2 totaal €225 afkoop van de complete schade komt dan op €975 ,00
Aangemaakt/aangepast door:
29/3 schaderapport gemaakt - achternaam / uren moeten nog in expo hierna kan hij gesloten worden naam2 een mail gestuurd - achternaam
|
When data is pasted from some (other) Mendix app, a <DIV> tag with a property like [widgetid="mxui_widget_TextArea_24"] is added to the text in the CKEditor:
for example:
<div data-mendix-id="561_3" focusindex="0" id="mxui_widget_TextArea_24" style="text-align:left" widgetid="mxui_widget_TextArea_24"> waterschade</div>
When leaving the page containing the CKEditor with this text (by saving or even using cancel button) , Mendix gives an error:
Cannot read property '_destroyed' of undefined TypeError: Cannot read property '_destroyed' of undefined
at http://localhost:8080/mxclientsystem/mxui/mxui.js?636664610094201914:46:44102
at Object.forEach (http://localhost:8080/mxclientsystem/mxui/mxui.js?636664610094201914:5:30397)
at Object.e.exports.destroyWidgetsIn (http://localhost:8080/mxclientsystem/mxui/mxui.js?636664610094201914:46:44078)
at O.(anonymous function).S.destroy (http://localhost:8080/mxclientsystem/mxui/mxui.js?636664610094201914:51:132910)
at O.(anonymous function).S. (http://localhost:8080/mxclientsystem/mxui/mxui.js?636664610094201914:51:369792)
at O.(anonymous function).S.a [as destroy] (http://localhost:8080/mxclientsystem/mxui/mxui.js?636664610094201914:5:53891)
at l.Animation.onEnd (http://localhost:8080/mxclientsystem/mxui/mxui.js?636664610094201914:74:160192)
at l.Animation._fire (http://localhost:8080/mxclientsystem/mxui/mxui.js?636664610094201914:5:117521)
at l.Animation._cycle (http://localhost:8080/mxclientsystem/mxui/mxui.js?636664610094201914:5:119428)
at Object. (http://localhost:8080/mxclientsystem/mxui/mxui.js?636664610094201914:5:26579)
After removing the [widgetid] property from the <DIV> tag in the text, error is gone.
The text was updated successfully, but these errors were encountered: