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

Unable to add ‘Create from template’ Macro to a Global Template

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

      Status Update 26 October 2020

      We reviewed this bug and could see that actual root cause is coming from the fact that no "space key" is chosen when adding "create from template" macro to a Global template.

      Details of the issue are submitted to the new bug:
      https://jira.atlassian.com/browse/CONFCLOUD-70992

      New workaround :

      1. Create / edit a Global template
      2. Add "create from template" macro
      3. Make sure to add "space key" at the bottom left of the macro edit form. After that "template name" drop-down will be available.
      4. Once you create a new page based on the global template, you will need to click "edit" button for "create from template" macro to have space key updated correctly.

      Current Behaviour

      When creating or editing a Global Template and trying to add the ‘Create from template’ Macro the macro editor hangs. Dropdowns aren't responsive.

      Error message

      404 error is thrown in the browser console:

      Workaround

      1. edit regular (non-template) Confluence page and add the ‘Create from template’ Macro to it;
      2. copy the macro from the page editor;
      3. edit a Global Template and past the macro copied in previous step;
      4. save the template - the macro button will work as expected.

      Note

      If user language is not English, the workaround won't work.

            [CONFCLOUD-35291] Unable to add ‘Create from template’ Macro to a Global Template

            Not in our instance. I just tried now again and it is still going to the space I initially set. What a bummer. Can someone from Confluence check our instance? This is not going to work for us. We need to create a template off of a form to make sure our users don't miss associating it to the parent form.

            Pong Bautista added a comment - Not in our instance. I just tried now again and it is still going to the space I initially set. What a bummer. Can someone from Confluence check our instance? This is not going to work for us. We need to create a template off of a form to make sure our users don't miss associating it to the parent form.

            There has been a fix, at least in my Confluence Cloud instance. You just have to set the space to whatever in order to add it to the template, then when you actually create a page from the template it will update the space key to the one you are currently in. 

            Lissa Meade added a comment - There has been a fix, at least in my Confluence Cloud instance. You just have to set the space to whatever in order to add it to the template, then when you actually create a page from the template it will update the space key to the one you are currently in. 

            It's 2024. Has there been a fix to not require the Space Key in GLOBAL TEMPLATES? What's an alternative solution? 

            Pong Bautista added a comment - It's 2024. Has there been a fix to not require the Space Key in GLOBAL TEMPLATES? What's an alternative solution? 

            The space key, which determines which space the new pages will be created in, is a required field in order to save the macro. However, with this fix, you should now be able to browse the global templates in the dropdown without specifying the space key first.

            Hayley Howell (Inactive) added a comment - The space key, which determines which space the new pages will be created in, is a required field in order to save the macro. However, with this fix, you should now be able to browse the global templates in the dropdown without specifying the space key first.

            Thank you for fixing this issue! I don't see any change in the admin UI yet, the space key is still required and @self doesn't work. Is there something I need to do in the admin, or are we waiting for a release?

            Lissa Meade added a comment - Thank you for fixing this issue! I don't see any change in the admin UI yet, the space key is still required and @self doesn't work. Is there something I need to do in the admin, or are we waiting for a release?

            Hi everyone,

            This is Hayley from the Confluence team. This bug is now fixed and I confirmed the functionality to be working as expected. Thank you for your patience!

            Sincerely,

            Hayley

            Hayley Howell (Inactive) added a comment - Hi everyone, This is Hayley from the Confluence team. This bug is now fixed and I confirmed the functionality to be working as expected. Thank you for your patience! Sincerely, Hayley

            Ben Shuker added a comment -

            Can I assume like most bugs this will continue to be ignored, or perhaps a fix will be rolled into a more expensive licence?

            Ben Shuker added a comment - Can I assume like most bugs this will continue to be ignored, or perhaps a fix will be rolled into a more expensive licence?

            Krista Stellar added a comment - - edited

            This is listed as in progress, however that's been true for over a year. And it was reported several years ago. Templates are a powerful feature of Confluence, but without this basic ability to effectively use the create from template macro button in a global template you are hampering the options for creating smooth workflows for creating pages based upon templates.

            Would it be possible to get an update? Is this really 'in progress'?

            Krista Stellar added a comment - - edited This is listed as in progress, however that's been true for over a year. And it was reported several years ago. Templates are a powerful feature of Confluence, but without this basic ability to effectively use the create from template macro button in a global template you are hampering the options for creating smooth workflows for creating pages based upon templates. Would it be possible to get an update? Is this really 'in progress'?

            Vasi added a comment -

            2f594e586857 thank you for the thorough check. I can confirm that, indeed, we have to open edit screen of the "create from template" macro to make sure that space key is updated.
            I corrected workaround section of this bug.

            Vasi added a comment - 2f594e586857  thank you for the thorough check. I can confirm that, indeed, we have to open edit screen of the "create from template" macro to make sure that space key is updated. I corrected workaround section of this bug.

            Vasi added a comment -

            2f594e586857,

            You are right - we shouldn't specify a space key since it is a global template. Hence, this is just a workaround for now.

            I was testing this workaround earlier and I could see that when a global template is created using new workaround, "create from template" macro will be having a space key configured based on a space where page is created (as it should work ideally).

            If it doesn't work for you, would be great if you could update the Support request that you have with us at the moment and we will check further.

             

            Vasi added a comment - 2f594e586857 , You are right - we shouldn't specify a space key since it is a global template. Hence, this is just a workaround for now. I was testing this workaround earlier and I could see that when a global template is created using new workaround, "create from template" macro will be having a space key configured based on a space where page is created (as it should work ideally). If it doesn't work for you, would be great if you could update the Support request that you have with us at the moment and we will check further.  

            @Vasi no problem.
            Not sure if I should be posting this in the new issue, but IMO SpaceKey should not be required on the macro for a "Global" template as by definition Global Templates don't belong to a Space.

            The new workaround works great, except that you're specifying a particular Space to create pages in, when I want the template button to create new pages in the space I've used the template in — so I'll still have to use my current workaround of editing all the template buttons to apply to the right space every time.

            Gordon Pedersen added a comment - @Vasi no problem. Not sure if I should be posting this in the new issue, but IMO SpaceKey should not be required on the macro for a "Global" template as by definition Global Templates don't belong to a Space. The new workaround works great, except that you're specifying a particular Space to create pages in, when I want the template button to create new pages in the space I've used the template in — so I'll still have to use my current workaround of editing all the template buttons to apply to the right space every time.

            Vasi added a comment -

            2f594e586857 thank you for bringing this to our attention!

            Vasi added a comment - 2f594e586857  thank you for bringing this to our attention!

            Vasi added a comment - - edited

            Hello everyone,

            Please check an update from October 26 2020 - new workaround.

            We can see that "create from template" macro cannot be edited and saved properly within a Global template as "space key" parameter is missing. Good news is that it is possible to use a workaround that doesn't require copy-paste from another page.
            This workaround also addresses the issue where space key is not changed within "create from template" macro after creating a page. You will need to open edit screen of the "create from template" macro once new page is created - this is enough to have space key updated to the space where page is located.

            New workaround:

            1. Create / edit a Global template
            2. Add "create from template" macro
            3. Make sure to add "space key" at the bottom left of the macro edit form. After that "template name" drop-down will be available.**
            4. Once you create a new page based on the global template, you will need to click "edit" button for "create from template" macro to have space key updated correctly.**

            Cheers,
            Vasily Logvinenko
            Atlassian Cloud Support

            Vasi added a comment - - edited Hello everyone, Please check an update from October 26 2020 - new workaround. We can see that "create from template" macro cannot be edited and saved properly within a Global template as "space key" parameter is missing. Good news is that it is possible to use a workaround that doesn't require copy-paste from another page. This workaround also addresses the issue where space key is not changed within "create from template" macro after creating a page.  You will need to open edit screen of the "create from template" macro once new page is created - this is enough to have space key updated to the space where page is located. New workaround: Create / edit a Global template Add "create from template" macro Make sure to add "space key" at the bottom left of the macro edit form. After that "template name" drop-down will be available. ** Once you create a new page based on the global template, you will need to click "edit" button for "create from template" macro to have space key updated correctly. ** Cheers, Vasily Logvinenko Atlassian Cloud Support

            I've been using the workaround listed here for quite a long time, but recently something has changed, and now if I copy-paste the template button from a page in a space, then for any page created with that template no matter what space it is in, the template button will create pages in the original space, instead of the space I want it.

            I have a workaround for this, too: When you create a new page from the template, you have to edit each of the copied template buttons individually. Editing the button will populate the space key property with the current space's key, so when you save it and re-publish the page the button will work as expected.

            I have a few templates with a whole bunch of template buttons, so this is quite annoying to have to go and fix each one, every time. I contacted support, they were able to replicate the issue and said they are working internally to have a new bug report created. If/when I get that link, I'll update here, too.

            Gordon Pedersen added a comment - I've been using the workaround listed here for quite a long time, but recently something has changed, and now if I copy-paste the template button from a page in a space, then for any page created with that template no matter what space it is in, the template button will create pages in the  original space, instead of the space I want it. I have a workaround for this, too: When you create a new page from the template, you have to edit each of the copied template buttons individually. Editing the button will populate the space key property with the current space's key, so when you save it and re-publish the page the button will work as expected. I have a few templates with a whole bunch of template buttons, so this is quite annoying to have to go and fix each one, every time. I contacted support, they were able to replicate the issue and said they are working internally to have a new bug report created. If/when I get that link, I'll update here, too.

            Loria Kutch added a comment - - edited

            I'm experiencing the problem on 6.0.3

            I tried the workaround. I created the buttons in a regular page & pasted the buttons into my global template. But when I create a page from the template, I click the publish button, and it just keeps spinning. The page doesn't publish.

            ----------

            Turns out the workaround didn't work for me because I had a LucidChart in the template. Also talking to LC now about what my options are (because can't use a screenshot or attachment in a template either).

            Loria Kutch added a comment - - edited I'm experiencing the problem on 6.0.3 I tried the workaround. I created the buttons in a regular page & pasted the buttons into my global template. But when I create a page from the template, I click the publish button, and it just keeps spinning. The page doesn't publish. ---------- Turns out the workaround didn't work for me because I had a LucidChart in the template. Also talking to LC now about what my options are (because can't use a screenshot or attachment in a template either).

            We are experiencing this in 5.9.12 Server. We are using the workaround, but it's a pain in the neck.

            Renee Lyons added a comment - We are experiencing this in 5.9.12 Server. We are using the workaround, but it's a pain in the neck.

            Just run into this problem too.

            ... I guess I'll see if the workaround works.

            David Bevin added a comment - Just run into this problem too. ... I guess I'll see if the workaround works.

            Many thanks for the workaround Anthony Main - That was huge.. Thanks a bunch..

            Richard Meadows added a comment - Many thanks for the workaround Anthony Main - That was huge.. Thanks a bunch..

            Thanks for sharing the workaround, anthony20! I'll add it to the issue description.

            Dobroslawa Wierzbicka (Inactive) added a comment - Thanks for sharing the workaround, anthony20 ! I'll add it to the issue description.

            I have found a work around:

            If you create a page within a space then edit the content.

            If you then add a Create from Template macro to the page as you wish, avoiding the point of contention.

            Then copy and paste this into a global template it will work as expected.

            Anthony Main added a comment - I have found a work around: If you create a page within a space then edit the content. If you then add a Create from Template macro to the page as you wish, avoiding the point of contention. Then copy and paste this into a global template it will work as expected.

              ele Eric Le (Inactive)
              namir Nursihah Amir (Inactive)
              Affected customers:
              44 This affects my team
              Watchers:
              64 Start watching this issue

                Created:
                Updated:
                Resolved: