NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      When you add a macro to a template, some of them (like TOC, Page Tree Search or Page Tree) fail to preview (but they work completely fine when the template is used afterwards) because they expect a space to exist. This is true even when creating a space template, which is bad.

      The error thrown when creating a TOC macro on a template is:

      Error rendering macro 'toc' : null
      

          Form Name

            [CONFSERVER-27660] Macros doesn't render on template preview

            Hi Mike

            Thanks for getting in touch. Yes, this is still resolved in 5.5.6

            Regards
            Steve Haffenden
            Confluence Bugmaster
            Atlassian

            Steve Haffenden (Inactive) added a comment - Hi Mike Thanks for getting in touch. Yes, this is still resolved in 5.5.6 Regards Steve Haffenden Confluence Bugmaster Atlassian

            Since Confluence 5.5.4 was withdrawn is this fixed in Confluence 5.5.6?

            mike mitchell added a comment - Since Confluence 5.5.4 was withdrawn is this fixed in Confluence 5.5.6?

            Hi jau,

            Can you tell us what flavour and version of Confluence you are running? Is it OnDemand or the download version? If it is OnDemand, you should not be seeing this issue. If it is the download version, you can check your version in the footer. The issue is fixed in Confluence 5.4 and above.

            Hope this helps!

            Niraj Bhawnani added a comment - Hi jau , Can you tell us what flavour and version of Confluence you are running? Is it OnDemand or the download version? If it is OnDemand, you should not be seeing this issue. If it is the download version, you can check your version in the footer. The issue is fixed in Confluence 5.4 and above. Hope this helps!

            Jimmy Au added a comment -

            Atlassian Team,

            I have experienced the same error message when I was trying to add a macro (table of contents) into my templates.

            Can you please look into that?

            Thanks,
            Jimmy

            Jimmy Au added a comment - Atlassian Team, I have experienced the same error message when I was trying to add a macro (table of contents) into my templates. Can you please look into that? Thanks, Jimmy

            sthanunathan.pattabiraman, this issue has been resolved in the upcoming Confluence 5.4 release, which we are hoping to release towards the end of this year.

            Samuel Day (Inactive) added a comment - sthanunathan.pattabiraman , this issue has been resolved in the upcoming Confluence 5.4 release, which we are hoping to release towards the end of this year.

            sthanu added a comment - - edited

            Sam
            This issue affecting us. I don't see any solution provided here to solve this issue. the links that you provided only hopping between pages

            sthanu added a comment - - edited Sam This issue affecting us. I don't see any solution provided here to solve this issue. the links that you provided only hopping between pages

            The two mentioned issues have been resolved (in CONF-23346 and CONF-25590 accordingly), so I am now marking this issue as resolved for 5.4.

            Samuel Day (Inactive) added a comment - The two mentioned issues have been resolved (in CONF-23346 and CONF-25590 accordingly), so I am now marking this issue as resolved for 5.4.

            Heimo Hänninen added a comment - - edited

            I get the error ALSO when viewing published (saved) page. I created my own template. TOC error came in preview of the template. Then when created the first page based on the the template I keep getting the error.

            I just found a workaround or actually a bug in my own template!
            -error seems to occur when you have some problems in your Heading tagged content. In my case, there where some strange inline coding? in Heading 1 Style content. I deleted the line, rewrote the heading and applied Heading 1 style.

            Other trick which might have had a positive impact was toggling TOC style between Inline and Flat (as you open Edit for TOC element).

            Heimo Hänninen added a comment - - edited I get the error ALSO when viewing published (saved) page. I created my own template. TOC error came in preview of the template. Then when created the first page based on the the template I keep getting the error. I just found a workaround or actually a bug in my own template! -error seems to occur when you have some problems in your Heading tagged content. In my case, there where some strange inline coding? in Heading 1 Style content. I deleted the line, rewrote the heading and applied Heading 1 style. Other trick which might have had a positive impact was toggling TOC style between Inline and Flat (as you open Edit for TOC element).

              sday@atlassian.com Samuel Day (Inactive)
              egarcia Angel Eduardo Garcia Hernandez (Inactive)
              Affected customers:
              15 This affects my team
              Watchers:
              16 Start watching this issue

                Created:
                Updated:
                Resolved: