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

Links wrapping images that have been centered with the old image dialog are lost on save

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 15.10.13, 16.8.0-rc-1, 16.4.4
    • 15.5-rc-1, 14.10.13
    • CKEditor
    • None
    • Integration
    • Unknown
    • N/A
    • N/A

    Description

      When upgrading from an old XWiki version you may have images that were inserted using the old image dialog. If these images were centered and have a wrapping link then that link is lost when the content is saved after the upgrade.

      The problem can be reproduced like this on the latest XWiki version (I tested with 16.7.0):

      • go to WYSIWYG editor administration and disable the xwiki-image plugin (this disables the new image dialog)
      • edit the Sandbox home page and:
        • center the image (with the old image dialog)
        • add a wrapping link pointing to some wiki page
      • save => this should produce wiki syntax like this:
        (% style="text-align:center" %)
        [[~[~[image:XWikiLogo.png~]~]>>doc:TestPage2]]
        
      • go back to the WYSIWYG editor administration section and re-enable the xwiki-image plugin
      • go back to the Sandbox page, reload the page and edit again
      • save without making any change

      Expected: the old alignment syntax is updated to match what the new image dialog uses but the link around the image is preserved

      [[~[~[image:XWikiLogo.png~|~|data-xwiki-image-style-alignment="center"~]~]>>doc:TestPage2]]
      

      Actual: the image alignment syntax is updated, but the wrapping link is lost in the process:

      [[image:XWikiLogo.png||data-xwiki-image-style-alignment="center"]]
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: