Hi,

we're using scaffolding to create standardized pages.
In these pages we use textareas, so the user cannot easily forget certain subjects.
The last of these texareas is for the user to add his/her own subjects, so i cannot use Headings outside this textarea in that case.

We've noticed that Headings embedded in a textarea aren't included in the TOC.

Do you know/have a solution for this?

(we're using Confluence v3.5.6 and Scaffolding v3.4.2)

2 answers

Hi Ruben,

I did a quick test an was able to replicate the problem. It seems that the {toc} macro is caching the TOC (which is a good thing, since generally the layout doesn't change, and it saves it from having to render the whole page twice every time you view it), however it's not updating the cache when Scaffolding data is saved.

I'm not sure if this is due to Scaffolding not sending out the correct event when it updates the page, or if it's something in TOC, or both, however there is a workaround. Simply add '?refresh=true' to the URL to force the TOC to refresh after you save a Scaffold page. Not ideal, but it's the best I've got at the moment.

It may also be worth raising an issue for Scaffolding (https://greenhouse.customware.net/jira/browse/SCAFF) and/or the TOC (https://studio.plugins.atlassian.com/browse/TOC).

Hope that helps!

David Peterson

This pointed me in the right direction, what i did as a workaround until the root problem is fixed is this:

I created a usermacro {kvk-refresh} which contains following code:

<a href="$content.getUrlPath()?refresh=true">$body</a>

Next, i added a call below my TOC heading in the scaffold like this:

h1. TOC
{kvk-refresh}(update TOC){kvk-refresh}
{toc:style=disc|indent=20px}

At least for now we're safe, i will file an issue for Scaffolding.

I don't actually know how scaffolding works (I haven't examined the customware code), but I do believe that it relies on some mechanism of "including a page," which means you're probably running into a variation of https://jira.atlassian.com/browse/CONF-3844

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,897 views 27 12
Join discussion

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