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

Inline rendering of macros is broken

    XMLWordPrintable

Details

    Description

      In Confluence 5.8.x inline macros properly render inline regardless of what you want to show. However in 5.9.1-pluginsfour018 the output is unpredictable:
      The macro is properly set to:
      @Override
      public OutputType getOutputType()

      { return OutputType.INLINE; }

      When the execute method of the macro returns (with xhtmlUtils being an instance of XhtmlContent):
      return xhtmlUtils.convertStorageToView("<ac:structured-macro ac:name=\"cheese\"></ac:structured-macro>Hello", conversionContext);
      the output is inline. However the following
      return xhtmlUtils.convertStorageToView("<ac:structured-macro ac:name=\"anchor\"><ac:parameter ac:name=\"\">some_anchor</ac:parameter></ac:structured-macro>Hello",conversionContext);
      it is not inline. In 5.9.1-pluginsfour018 the inline functionality seems to be dependent on what the macro renders.

      Steps to reproduce

      1) Build a simple plugin with one Macro in it.
      2) Set the appropriate functions to return BodyType.NONE and OutputType.INLINE.
      3) Let the execute method return the strings from my last comment.
      4) The string with the cheese macro renders inline, the other one doesn't.

      Attachments

        Issue Links

          Activity

            People

              kma@atlassian.com Khanh Ma (Inactive)
              dazmi Dayana
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: