Details
-
Bug
-
Resolution: Solved By
-
Blocker
-
None
-
10.10-rc-1
-
Unknown
-
Description
This issue can be reproduced using the following lines.
{{info}} (% class="someclass" %)Some text {{mention reference="XWiki.Admin" style="FULL_NAME" anchor="XWiki-Admin-yoWKy"/}} {{/info}}
1. Edit a page in wiki mode and paste the previous lines in the content
2. Save the page
3. Edit the page inplace or in wysiwyg mode and save page or view the source of the document.
If the source is viewed, the mention macro is missing which leads to the deletion of the macro if the page is saved.
When clicking the source button, the following data is sent to the server
<!--startmacro:info|-||-|(% class="someclass" %)Some text {{mention reference="XWiki.Admin" style="FULL_NAME" anchor="XWiki-Admin-yoWKy"/}}--> <div data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" class="xwiki-metadata-container"> <p> <span class="someclass"> Some text <!--startmacro:mention|-|reference="XWiki.Admin" style="FULL_NAME" anchor="XWiki-Admin-yoWKy"--><!--stopmacro--></span> </p> </div><!--stopmacro-->
Which doesn't seem to be faulty in any way. This indicates that the issue might be with the the component that is responsible with the conversion from html to xwiki syntax.
Another observation is that the issue does not reproduce if the content of the macro is wrapped in a group/div rather than a span.
This ticket might be hiding two issues:
1. in rendering when converting xhtml to xwiki syntax, the nested macro is lost
.runTransformations .#----------------------------------------------------- .input|xhtml/1.0 .#----------------------------------------------------- <!--startmacro:info|-||-|(% class="someclass" %)aaaa \{\{info}}bbb\{\{/info}}--><div class="box infomessage"><div data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" class="xwiki-metadata-container"><p><span class="someclass">aaaa <!--startmacro:info|-||-|bbb--><span class="box infomessage"><span data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" class="xwiki-metadata-container">bbb</span></span><!--stopmacro--></span></p></div></div><!--stopmacro--> .#----------------------------------------------------- .expect|xwiki/2.1 .#----------------------------------------------------- {{info}} (% class="someclass" %)aaaa {{info}}bbb{{/info}} {{/info}}
2. in ckeditor, when calling the annotated html to xwiki endpoint, the nested macro is already missing from the annotated html
Attachments
Issue Links
- depends on
-
XRENDERING-712 annotated xhtml Inline macro following inline parameters can be lost when rendered in xwiki syntax
- Closed
- is caused by
-
XRENDERING-518 The macro content descriptor should specify if it can be edited inline
- Closed