Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-60351

/rest/api/contentbody/convert/export_view losing context when converting from storage representation

    XMLWordPrintable

Details

    Description

      /rest/api/contentbody/convert/export_view losing context when converting from storage representation.

      Everything works fine when using /rest/api/contentbody/convert/view

      Example:

      REQUEST BODY:

      {content: 
      	{id: "18986705"}, 
      	representation: "storage", 
      	value: "<p><ac:structured-macro ac:name="jira" ac:schema-version="1" ac:macro-id="638eae37-b517-42c2-8b59-23b91b146a68"><ac:parameter ac:name="server">Atlassian JIRA</ac:parameter><ac:parameter ac:name="columns">key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution</ac:parameter><ac:parameter ac:name="serverId">144880e9-a353-312f-9412-ed028e8166fa</ac:parameter><ac:parameter ac:name="key">CONF-43178</ac:parameter></ac:structured-macro></p>"
      }
      


      1. HTML in the response for the endpoint /rest/api/contentbody/convert/export_view

      <span class=\"jira-issue\" data-jira-key=\"CONF-43178\" >
      	<a href=\"https://jira.atlassian.com/browse/CONF-43178?src=confmacro\" class=\"jira-issue-key\"><img class=\"icon\" src=\"$iconUrl\" />CONF-43178</a>
      	-
      	<span class=\"summary\"></span>
      	<span class=\"jira-status\">
      		(
      			<img class=\"icon\" src=\"$statusIcon\" />
      		)
      	</span>
      </span> 
      


      2. HTML in the response for /rest/api/contentbody/convert/view

      <span class="jira-issue conf-macro output-block" data-jira-key="CONF-43178" data-hasbody="false" data-macro-name="jira">
      	<a href="https://jira.atlassian.com/browse/CONF-43178?src=confmacro" class="jira-issue-key"><img class="icon" src="https://jira.atlassian.com/secure/viewavatar?size=xsmall&amp;avatarId=51505&amp;avatarType=issuetype" />CONF-43178</a>
      	-
      	<span class="summary">Confluence behind multiple reverse proxies</span>
      	<span class="aui-lozenge aui-lozenge-subtle aui-lozenge-complete jira-macro-single-issue-export-pdf">Needs Verification</span>
      </span>  
      


      As you can see the correct icons url are returned in #2, while in #1 they are replaced with $statusIcon and $iconUrl. Also, the description is missing in #1.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dbonotto Dario B
              Votes:
              16 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: