$action not working in user macros after upgrade.

Neil Gower April 11, 2023

Hi,

We are doing an upgrade from Confluence 7.17.1 to 7.19.7, and we have a bunch of user macros that no longer work and they just show the content of the macro. Its almost as if either "$action" has stopped working or the server is failing to actually run the code.

For example the macro below works fine in the current version but just prints the line of code in the upgraded version:


## Macro title: creationdate
## Macro has a body: N
##
## Developed by: Thomas Schlegel

## @noparams

$action.dateFormatter.formatDateTime($content.getCreationDate())

 

If you remove the "$action.dateFormatter.formatDateTime(" and just access the content it works fine, its almost as if Confleunce is just not running the code and just printing it.

I am not a coder so any help would be apprecaited so we can continue the upgrade


 

Thanks

1 answer

0 votes
Dean Norman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 11, 2023

Hi Neil,

    It is possible that you are hitting this bug CONFSERVER-82741 - Variables in user macro are not resolved
    There is a workaround in that bug report that can be applied, but if you are still having issues I suggest you open a ticket with support for further help.

I hope this helps!

Dean

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events