This issue has been created
There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-7168cdb5-f848-4d13-95b9-1b6165194f61 XWIKI-22482 Open

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

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-9d80a66f-d302-432e-a20a-7a366fa8b575 Marius Dumitru Florea created this issue on 04/Sep/24 16:13
 
Summary: Links wrapping images that have been centered with the old image dialog are lost on save
Issue Type: cid:jira-generated-image-avatar-7168cdb5-f848-4d13-95b9-1b6165194f61 Bug
Affects Versions: 14.10.13, 15.5-rc-1
Assignee: Unassigned
Components: CKEditor
Created: 04/Sep/24 16:13
Priority: cid:jira-generated-image-static-critical-54c3b8d2-c295-4a1c-8c07-12ec074c9d93 Critical
Reporter: Marius Dumitru Florea
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"]]
 
 

1 comment

 
cid:jira-generated-image-avatar-9d80a66f-d302-432e-a20a-7a366fa8b575 Marius Dumitru Florea on 04/Sep/24 16:14
 

Note that such images were breaking the editor before XWIKI-21023.