Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-22489

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 15.10, 16.1.0
    • Image
    • None
    • Windows 11 Pro, Edge 128, using a local instance of XWiki 15.10.12 on MariaDB 11.4, Tomcat 9.0.93
    • Unknown

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            iandriuta Ilie Andriuta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: