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

Cannot copy paste text with images from word files anymore due to a JS error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 15.5.3, 14.10.18, 15.9-rc-1
    • 15.5-rc-1, 14.10.12
    • WYSIWYG Editor
    • Windows 11 Pro, Edge 117, Chrome 117, using a local instance of XWiki 14.10.17 on HSQLDB/Jetty
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce

      1. Open a .doc, .docx or .rtf file containing text with image(s)
      2. Copy some text including one or more images at the same time
      3. Edit a page in-place or in WYSIWYG mode
      4. Press CTRL + V

      Expected results

      The whole content is pasted properly into wiki page, text with image(s).

      Actual results

      Nothing is pasted. In the browser's console, the following error is displayed:

      Uncaught TypeError: Cannot read properties of undefined (reading 'split')
          at b.uploadRepository.create (ckeditor.js:1605:130)
          at f.<anonymous> (ckeditor.js:1444:499)
          at f.l (ckeditor.js:10:246)
          at f.<anonymous> (ckeditor.js:12:91)
          at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fire (ckeditor.js:13:285)
          at ckeditor.js:1296:190
          at Object.<anonymous> (ckeditor.js:1295:361)
          at Object.callback (ckeditor.js:251:178)
          at n (ckeditor.js:249:111)
          at Array.p (ckeditor.js:249:266)

      The issue does not reproduce when the text or image(s) are copied separately and could not be reproduced on XWiki 14.10.11 or 15.4.

      The issue was reproduced initially by Lucian.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: