This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-57786dac-d8cf-4fb2-8310-37b6ebd038de XWIKI-22489 Open

Uploading images through Quick Actions in-place editor fails if the page is edited by multiple users simultaneously

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-061d6ec2-3168-45d3-954c-d641ca029a02 Ilie Andriuta created this issue on 05/Sep/24 15:30
 
Summary: Uploading images through Quick Actions in-place editor fails if the page is edited by multiple users simultaneously
Issue Type: cid:jira-generated-image-avatar-57786dac-d8cf-4fb2-8310-37b6ebd038de Bug
Affects Versions: 15.10, 16.1.0
Assignee: Unassigned
Attachments: Failed_to_Upload.log, Failed_to_upload.png
Components: Image
Created: 05/Sep/24 15:30
Environment: Windows 11 Pro, Edge 128, using a local instance of XWiki 15.10.12 on MariaDB 11.4, Tomcat 9.0.93
Priority: cid:jira-generated-image-static-major-e38bbc81-21d2-4497-9f7d-5b346bc3aeae Major
Reporter: Ilie Andriuta
Description:

Steps to reproduce

  1. Edit a page in-place with an user (e.g. U1)
  2. Open the same page in Incognito mode or on another browser
  3. Login with another user there (e.g. U2)
  4. Edit the page (force the lock), doesn't matter if the second user edits with in-place editor or WYSIWYG editor
  5. With the first user (U1), type / to bring the Quick Actions list
  6. Select "Image"
  7. 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://localhost:1512/xwiki/rest/wikis/xwiki/spaces/ccc/pages/WebHome/attachments?prettyNames=true&createPage=true 500 (Server Error)
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.