-
Bug
-
Resolution: Fixed
-
High
-
9.0.1, 9.0.2
-
1
-
Severity 2 - Major
-
Problem
Inserting a User Macro with variables in a Confluence page results in the variables to be displayed as is without substituting their computed values.
Environment
Confluence v9.0.x
Steps to Reproduce
- Login as admin
- Define a new User Macro with the following template code:
## @noparams #set($userDetailsManager = $containerContext.getComponent('userDetailsManager')) #set( $user = $action.remoteUser) <h1> Hello $req.userPrincipal.name</h1> <br /> Hello $action.remoteUser.name <br /> Hello $user.name <pre> $action.authenticatedUser.name $action.authenticatedUser.fullName $action.authenticatedUser.key $action.dateFormatter.formatGivenString("yyyy-MM-dd", $content.getCreationDate()) </pre>
- Set Macro Body Processing to Rendered
- Create a new page and add the macro created above.
- Save the page
Expected Results
Variables in the macro are resolved and the page shows/renders variable values.
Actual Results
Macro displays literal variable names instead of resolved / rendered values.
Factoring in the following system property does not help
-Dmacro.required.velocity.context.keys=comma,seperated,key,values
Workaround
Currently there is no known workaround for this behavior.
- is cloned from
-
CONFSERVER-82741 Variables in user macro are not resolved
- Closed
- mentioned in
-
Page Loading...