Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-91663

Multiple Confluence Macro functionality affected due to Unexpected close tag </p>; expected </img> error.

XMLWordPrintable

      Issue Summary

      Multiple Confluence Macro functionality affected due to Unexpected close tag </p>; expected </img> error.

      Tested and Affected Confluence Macro list:

      • Expand Macro tested
      • Info tested
      • Tip tested
      • Note tested
      • Warning tested

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      1. Add some text to a page.
      2. Add an image to the page.
      3. Select the image with text above it and select any of the above Macro from the Macro browser.

      Expected Results

      The Macro window should appear with selected content in it in Edit mode and after saving the page the Macro should show up with the selected content.

      Actual Results

      The content and the image are deleted in edit mode and not shown after saving.

      The below exception is thrown in the atlassian-confluence.log file:

      2023-09-21 14:21:17,923 ERROR [http-nio-8090-exec-18 url: /confluence/rest/tinymce/1/macro/placeholder; user: xxxx] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error :
       -- url: /confluence/rest/tinymce/1/macro/placeholder | userName: xxxxx | referer: https://xxxxx/confluence/pages/editpage.action?pageId=1146889 | traceId: 3cc519d00413a01b
      java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </p>; expected </img>.
       at [row,col {unknown-source}]: [1,1468]
              at org.codehaus.stax2.ri.evt.Stax2FilteredEventReader.hasNext(Stax2FilteredEventReader.java:60)
              at com.atlassian.confluence.content.render.xhtml.XmlFragmentEventReader.hasNext(XmlFragmentEventReader.java:42)
              at com.atlassian.confluence.content.render.xhtml.XmlFragmentBodyEventReader.hasNext(XmlFragmentBodyEventReader.java:36)
              at com.atlassian.confluence.content.render.xhtml.ForwardingXmlEventReader.hasNext(ForwardingXmlEventReader.java:24)
              at com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transform(DefaultFragmentTransformer.java:116)
              at com.atlassian.confluence.content.render.xhtml.DefaultEditorFormatService.streamStorageToEdit(DefaultEditorFormatService.java:126)
              at com.atlassian.confluence.content.render.xhtml.DefaultEditorFormatService.convertMacroDefinitionToEdit(DefaultEditorFormatService.java:85)
              at jdk.internal.reflect.GeneratedMethodAccessor1978.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      ......
      Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </p>; expected </img>.
       at [row,col {unknown-source}]: [1,1468]
      

      Workaround

      Add the Macro from the Macro browser to the page, add content to it, and save.

        1. 8.3_issue_reproduction.jpg
          525 kB
          Ojas Potdar
        2. conf82_Exepected_result.jpg
          147 kB
          Ojas Potdar

              a9293dbdc671 Thomas Rogozinski
              14e5536372e2 Ojas Potdar (Inactive)
              Votes:
              8 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: