When creating a user macro, there is no support for specifying use of the default parameter – <ac:default-parameter> in storage format.

      When defining the macro parameters, parsing of parameters requires that the macro parameter have a name, otherwise the parameter is ignored (with the log warning of "Skipping undefined parameter for macro <macroName>"). However, the default parameter has no name.

      This is of particular concern to users upgrading from 3.5 to 4.x, where their user macros will be migrated to use <ac:default-parameter>, yet it cannot be referenced as a legitimate user macro parameter by the macro browser.

            [CONFSERVER-24254] User Macros cannot make use of the default parameter

            Atlassian Update - September 2019

            Thank you for your interest in this ticket. The Confluence Server and Data Center team released a major upgrade to the editor in 6.14. Due to the age of this ticket and/or lack of updates, we suspect that this issue is no longer relevant or was resolved as a result of the upgrade and are now closing this ticket.

            If this issue is still a problem in your Confluence instance in version 6.15 or later, please tag me in your comment and we can reopen this ticket for review.

            You can read more about the editor upgrade in the 6.14 Release Notes.

            Thanks

            Makisa Appleton | Senior Product Manager, Confluence Server and Data Center

            Makisa Appleton added a comment - Atlassian Update - September 2019 Thank you for your interest in this ticket. The Confluence Server and Data Center team released a major upgrade to the editor in 6.14. Due to the age of this ticket and/or lack of updates, we suspect that this issue is no longer relevant or was resolved as a result of the upgrade and are now closing this ticket. If this issue is still a problem in your Confluence instance in version 6.15 or later, please tag me in your comment and we can reopen this ticket for review. You can read more about the editor upgrade in the 6.14 Release Notes . Thanks Makisa Appleton | Senior Product Manager, Confluence Server and Data Center

            G B added a comment -

            Unfortunately, "View Storage Format" is only available to those allowed to edit the storage format. Linking these together was a bad design decision as we would like to grant people permission to view to work around this problem but do not want to grant permission to edit.

            G B added a comment - Unfortunately, "View Storage Format" is only available to those allowed to edit the storage format. Linking these together was a bad design decision as we would like to grant people permission to view to work around this problem but do not want to grant permission to edit.

            Semi-Workaround

            An old user macro might look like this in wiki-markup:

            {foo:bar|title=baz}
            

            The first param did not require you to specify a name: this was called a default-param. (That being said, you could have done something like {foo:bar|baz}, but that's not the point i'm trying to make.)

            A side effect of upgrade is that the macro browser does not present the original param is blank. For those who need to access the original default param, you can view storage format on the upgrade page and get the param back from the <default-parameter> field on the <ac:macro>.

            This is persisted across page history, so if need be, you can go back in time to get at the original values.

            As soon as you use the edit dialog box on the user macro, it will change to the new format.

            Tim Wong (Inactive) added a comment - Semi-Workaround An old user macro might look like this in wiki-markup: {foo:bar|title=baz} The first param did not require you to specify a name: this was called a default-param. (That being said, you could have done something like {foo:bar|baz}, but that's not the point i'm trying to make.) A side effect of upgrade is that the macro browser does not present the original param is blank. For those who need to access the original default param, you can view storage format on the upgrade page and get the param back from the <default-parameter> field on the <ac:macro>. This is persisted across page history, so if need be, you can go back in time to get at the original values. As soon as you use the edit dialog box on the user macro, it will change to the new format.

            Daz added a comment -

            The interesting thing to note is that the default parameter can still be referenced in a user macro body via $param0, but it cannot be defined in the metadata, which is a prerequisite for the param showing up in the macro browser.

            Daz added a comment - The interesting thing to note is that the default parameter can still be referenced in a user macro body via $param0 , but it cannot be defined in the metadata, which is a prerequisite for the param showing up in the macro browser.

              Unassigned Unassigned
              cdarroch Daz
              Affected customers:
              12 This affects my team
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: