h3. Steps to reproduce
Copy/paste the below content into any tesp page , save it and try to edit it again via CKEditor {code:none} [[image:data:image/gif;base64,,R0lGODlhDgAOAIAAAAAAAP///yH5BAAAAAAALAAAAAAOAA4AAAIMhI+py+0Po5y02qsKADs=||data-widget="uploadimage"]] {code} h3. Actual result
You'll get the infinite spinner without an option to edit the page. h3. Expected result
You can edit the page without issues.
h3. Note
The workaround is either to remove the above content via Wiki-mode editor, or either wrapped it into comment tags, or remove the last element {code:java} data-widget="uploadimage"{code}
h3. Details
The {{data:image/...}} is irrelevant, the main point is to have a {{data-widget="uploadimage"}} attribute on the image.
On 16.3 the following stacktrace is shown in the browser console: {noformat} Uncaught TypeError: this.wrapper.findOne(...) is null init ckeditor.js:41219 h ckeditor.js:31111 initOn ckeditor.js:32648 initOnAll ckeditor.js:32654 C ckeditor.js:31831 l ckeditor.js:179 fire ckeditor.js:239 fire ckeditor.js:291 setData ckeditor.js:10894 setup ckeditor.js:11084 l ckeditor.js:179 fire ckeditor.js:239 fire ckeditor.js:291 setData ckeditor.js:8068 convertHTML ckeditor.js:45536 jQuery 8 convertHTML ckeditor.js:45445 convertHTML ckeditor.js:45530 maybeConvertHTML ckeditor.js:45521 onMode ckeditor.js:45513 l ckeditor.js:179 fire ckeditor.js:239 fire ckeditor.js:291 setMode ckeditor.js:10440 setTimeout handler*CKEDITOR.editor.prototype.setMode/< ckeditor.js:10437 overwriteWysiwygMode ckeditor.js:46231 setMode ckeditor.js:10429 exec ckeditor.js:45287 exec ckeditor.js:5853 execCommand ckeditor.js:8005 click ckeditor.js:20128 execute ckeditor.js:20171 p ckeditor.js:20197 addFunction ckeditor.js:784 callFunction ckeditor.js:793 onclick (index):1 ckeditor.js:formatted:41219:37 init ckeditor.js:41219 h ckeditor.js:31111 initOn ckeditor.js:32648 initOnAll ckeditor.js:32654 C ckeditor.js:31831 l ckeditor.js:179 fire ckeditor.js:239 fire ckeditor.js:291 setData ckeditor.js:10894 setup ckeditor.js:11084 l ckeditor.js:179 fire ckeditor.js:239 fire ckeditor.js:291 setData ckeditor.js:8068 convertHTML ckeditor.js:45536 jQuery 8 convertHTML ckeditor.js:45445 convertHTML ckeditor.js:45530 maybeConvertHTML ckeditor.js:45521 onMode ckeditor.js:45513 l ckeditor.js:179 fire ckeditor.js:239 fire ckeditor.js:291 setMode ckeditor.js:10440 (Async: setTimeout handler) setMode ckeditor.js:10437 overwriteWysiwygMode ckeditor.js:46231 setMode ckeditor.js:10429 exec ckeditor.js:45287 exec ckeditor.js:5853 execCommand ckeditor.js:8005 click ckeditor.js:20128 execute ckeditor.js:20171 p ckeditor.js:20197 addFunction ckeditor.js:784 callFunction ckeditor.js:793 onclick (index):1
{noformat}
The issue exists since XWiki Enterprise 8.2 where CKEditor was introduced as the default wysiwyg editor (XE-1562) with CKEditor 4.5.9. Whenever the {{data-widget}} matched a know widget id (e.g., {{xwiki-macro}}, or {{uploadimage}}), the image seems to be initialized as the corresponding widget. Making the edit fail in unexpected ways. |
|