The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

User macro stopped working because of missing context keys

Houssein Barkallah
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 8, 2024

Hello fellow people.

We have a Confluence DC, to which we have added several "User Macros". 
One of which is pretty old yet very useful to us in formatting pages.

The macro stopped working and it only displays this message: 

User Macro "MACRO NAME" may use context keys [ action, permissionHelper, pageManager ] which are not set in system property macro.required.velocity.context.keys. If the macro is not rendered as expected, try to manually add those keys into the system property.

How is it possible to add the missing context keys? Thanks.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Pavel Junek
Community Champion
February 8, 2024

Hi Houssein,

You can see this Confluence Bug - CONFSERVER-82741 (Variables in user macro are not resolved) 

Here is described workaround:

Workaround

Please review the User Macro administration interface and the documentation at Confluence objects accessible from Velocity to determine what modules should be allow listed.

Modules can be added using the system property below

-Dmacro.required.velocity.context.keys=comma,seperated,key,values
DEPLOYMENT TYPE
SERVER
VERSION
8.5.5
TAGS
AUG Leaders

Atlassian Community Events