Steps to reproduce
- Edit a page in-place with an user (e.g. U1)
- Open the same page in Incognito mode or on another browser
- Login with another user there (e.g. U2)
- Edit the page (force the lock), doesn't matter if the second user edits with in-place editor or WYSIWYG editor
- With the first user (U1), type / to bring the Quick Actions list
- Select "Image"
- Click on "Upload Image", select an image and insert it
Expected results The image is inserted properly, without any errors. Actual results The image fails to be inserted. No errors in XWiki logs, but the following error is displayed in JS console:
POST http:send @ jquery.min.js?r=1:2
ajax @ jquery.min.js?r=1:2
(anonymous) @ jquery-migrate.js:379
e.<computed> @ jquery-migrate.js:181
ce.<computed> @ jquery.min.js?r=1:2
attachFile @ VM987:54
(anonymous) @ plugin.js:333
Promise.then
(anonymous) @ plugin.js:314
execCb @ require.min.js?r=1:5
check @ require.min.js?r=1:5
enable @ require.min.js?r=1:5
init @ require.min.js?r=1:5
(anonymous) @ require.min.js?r=1:5
setTimeout
req.nextTick @ require.min.js?r=1:5
s @ require.min.js?r=1:5
requirejs @ require.min.js?r=1:5
(anonymous) @ plugin.js:293
execCb @ require.min.js?r=1:5
check @ require.min.js?r=1:5
enable @ require.min.js?r=1:5
init @ require.min.js?r=1:5
(anonymous) @ require.min.js?r=1:5
setTimeout
req.nextTick @ require.min.js?r=1:5
s @ require.min.js?r=1:5
requirejs @ require.min.js?r=1:5
outputTemplate @ plugin.js:282
CKEDITOR.template.output @ ckeditor.js:342
getHtmlToInsert @ ckeditor.js:677
(anonymous) @ plugin.js:261
a @ plugin.js:306
getHtmlToInsert @ plugin.js:260
commit @ ckeditor.js:676
onItemClick @ ckeditor.js:678
l @ ckeditor.js:10
(anonymous) @ ckeditor.js:12
(anonymous) @ ckeditor.js:681
l @ ckeditor.js:10
(anonymous) @ ckeditor.js:12
(anonymous) @ ckeditor.js:65
The issue seems to be reproducing when the image is uploaded through Quick Actions, but not through Upload tab from Toolbar's Image Dialog. Another thing I've noticed is that the user who gets the error has to edit the page in-place, not in WYSIWYG mode. There may be also cases when the issue is not reproducing on the first image insertion. The issue was tested and reproduced also on XWiki 15.10 and 16.1.0. |