Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot seem to create a template with Anchors and internal page links (#link)?

Karl Parry March 5, 2014

I have been tasked to create some templates in Confluence. I can create a tamplate and places anchors without any issues. But when I place the internal page #link it replaces the link with "bad link"

If you create the page then edit it, then save it, the links then work and render correctly. Is this a bug or intended behavior?

6 answers

4 votes
Michelle Vincent
Contributor
February 2, 2017

I have been experiencing the same issue. But I tried the workaround specified in the Atlassian bug ticket linked above using link markup [link text|#anchorname] in the template and although it still looks broken when creating the page, as soon as I save the page using the template, the anchor links do work.

Don Bills
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 13, 2017

I tried the work around noted by Michelle, using the markup (like you would in a JIRA issue comment), and it also worked.  After the final close bracket and 'enter', it displays as "Broken Link" inside the template itself, and then shows just a "0" for the text when viewing the template.  But, when actually creating a new page from template and publishing, the text displays as intended and the anchor links works.

Only bummer is that you can't edit the anchor inside the template or view what you were intended later, and can't copy/paste to other places within the page, but those are small prices to pay for the workaround to work!  

Have long wanted this option, glad I did some additional Google searches today when someone else in my organization asked about how to do this!

Courtney Langdon June 21, 2017

This workaround worked for me, too, so thank you, Michelle!

Petteri Hakkarainen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 6, 2019

This works fine. However Copy-Paste works only, if page (where to copy) is in edit mode. First time when creating new page from template it looks funny, but after save works fine. Thanks for sharing.

0 votes
salehparsa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2014

As you are affected by the bug with CONF-26897 ticket number, I would recommend that you watch the ticket to receive the updates and workaround.

Cheers,

Saleh

0 votes
Karl Parry March 6, 2014

Thank you. I will keep with the broken link method achieves what I need even if it is a bit messy for now

0 votes
salehparsa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2014

Take a look at CONF-26897 . It seems that it is a bug.

0 votes
Karl Parry March 6, 2014

Here are the steps to re-create the issues: -

  1. Create a Template (has to be a template not an actual page)
  2. Add an Anchor Macro (with any name e.g. link)
  3. Create a link to the Anchor name (e.g. [#link], [#Actions])
  4. You get a (!) Broken Link displayed
  5. Broken Link image
  6. Also if you create it via the link macro you get the error "The markup provided is not valid link markup" and you cannot click insert. There is an anchor called "Anction" and one called "Actions" on the page.
  7. Markup error
  8. If you save the template with the broken link error above it will save fine.
  9. You can then create a page using the template.
  10. The links will still be broken links but when you press save on the page you created using the template all the links will work and display correctly.

We are using Confluence 5.4.2.

I am also using Firefox 26.0

0 votes
salehparsa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2014

Hi Karl,

Just for clarification:

  1. Created a page with Anchor Macro (Anchor Name : link).
  2. Created other page and link it to first page. (It worked)
  3. Edited anchor macro name to "RenamedLink"
  4. Used my second page and it works fine.
  5. Created a link in first page
  6. It works fine.
  7. Renamed anchor macro
  8. The link in the first page is not working.

Is that your scenario?! Would you please tell me what version of Confluence are you using and What is your browser?!

Cheers,

Saleh

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events