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

The Edit Macro dialog breaks the content of a content macro whose syntax differs from the page

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.14, 18.8.0
    • CKEditor
    • None
    • Unknown

    Description

      When a content macro declares a syntax other than the syntax of the page, the Edit Macro dialog of an existing macro shows its content converted to the syntax of the page instead of the syntax of the macro. Submitting the dialog without any change saves that converted text into the macro, which then reads it with its own syntax: the content is broken.

      Steps to reproduce

      1. Create a page in XWiki 2.1 with this content:
        {{content syntax="html/5.0"}}<p>This is <strong>bold</strong> too!</p>{{/content}}
        
      2. Edit the page with the WYSIWYG editor and open the Edit Macro dialog of the content macro.
      3. Submit the dialog without changing anything, then save the page.
      • Expected: the Content field shows the HTML of the macro, and the page is saved unchanged.
      • Actual: the Content field shows This is **bold** too!, in XWiki syntax, and the page is saved as {{content syntax="html/5.0"}}<p>This is **bold** too!</p>{{/content}}, which displays the asterisks instead of the bold text.

      Editing the content in place works: it is saved back in the syntax of the macro. Only the dialog loses it. XRENDERING-593, where the source syntax is lost in the annotated XHTML, may be the cause. XWIKI-25443 covers the other problem of the same dialog, the content shown as a plain text area.

      KOs covered

      Macro Criterion Problem
      content E6 inplace The Edit Macro dialog of an existing macro shows the content converted to the syntax of the page instead of the syntax of the macro, and submitting it unchanged breaks the content.

      Impact found on macro fluidity

      This KO comes from the WYSIWYG usability audit of the macros, under the criterion E6 inplace of its usability criteria. The page of the macro, linked in the table, has the full notes and the steps to reproduce.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Lucas C Charpentier Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: