Excerpt-include macro and links with anchors

I have release notes with a summary section and a details section. I use a link with an anchor to move from the summary to the details:

=========markup===========

h2. Highlights of This Release

{excerpt}

[Feature Label|Release Notes File Name#feature1anchor] --- Brief description of Feature 1.

[Feature2 Lable|Release Notes File Name#feature2anchor] --- Brief description of Feature 2.

{excerpt}

h2. Details

h3.{anchor:feature1}{color:#0c598a}Details of Feature 1{color}

A more detailed description...

h3.{anchor:feature2}{color:#0c598a}Details of Feature 2{color}

A more detailed description...

=====end markup==============

Then I use the excerpt-include macro to include the highlights (surrounded by excerpt tags) in a summary page for all of the releases (similar to Atlassian's Alldoc page). But the excerpts show the links as going to the summary (alldoc) page, rather than the original page. There is no error; the links look like they resolve, but they don't work.

Why is Confluence not using the explicit file name in the links in the original file?

Thanks,
Barbara

3 answers

This widget could not be displayed.

I suspect that this is related to a problem I have been experiencing while making changes to the comment move plugin.

What appears to be happening is that the new XML storage format stores links to the current page in a different format to those to other pages (despite the method of entering the link being the same), here is an example of the storage format for my comment:

<p>
  <ac:link>
    <ac:plain-text-link-body>
      <![CDATA[This comment was originally created on the Home page of the TEST space.]]>
    </ac:plain-text-link-body>
  </ac:link>
</p>
<p>
  <ac:link>
    <ri:page ri:content-title="PIN test" />
    <ac:plain-text-link-body>
      <![CDATA[This link was originally pointing to the PIN Test page in the TEST space.]]>
    </ac:plain-text-link-body>
  </ac:link>
</p>

You will notice that the first link does not contain an <ri> tag ... I suspect that because there is no <ri> tag then the renderer 'assumes' the current page, I dare say that this may be what's ocurring with the excerpt-include macro.

This widget could not be displayed.

Hi Barbara,

I am not 100% sure in your specific case but it does sound like you might be hitting this bug which was related to using excerpt-include in an excerpt. Note that this has been fixed in Confluence 4.0.

Thanks,
John

Thanks for your response, but I don't think that is it. The excerpt renders correctly, it's just the links within the excerpt that are broken. I think it's really an instance of normal behavior, but one that does not work as I would expect it. It's acting like a Confluence move (changing the link source relative to the file where it's included), when it should act like a Confluence copy (maintaining the link relative to it's original location).

This widget could not be displayed.

If you try to include a Table of Contents in an Excerpt, and then include that Excerpt in another page, none of the TOC links work.

This remains a bug.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published yesterday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

33 views 5 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you