User Macro not working after upgrade

Augustin Luton October 16, 2023

Hello, 

Could you please help me on this code? 

This is a user macro which displays a table with all spaces and their administrators, whatever the current user's permission.

It does not work since upgrading from 7.13 to 7.19

Thanks a lot for your help!

 

<table class="confluenceTable">
<tr>
<th class="confluenceTh">Spaces</th>
<th class="confluenceTh">Admins</th>
</tr>

#foreach ( $space in $spaces )
#if((!($space.isArchived())) && ($space.isGlobal()))
<tr>
#set($result=$space.getDescription().getDescriptionTitle())

<td class="confluenceTd"><a href="$req.contextPath$space.getUrlPath()">$space.getName()</a></td>
<td class="confluenceTd">
#foreach ($permission in $space.getPermissions())
#if ($permission.isUserPermission() && $permission.getType() == "SETSPACEPERMISSIONS")
#usernameLink($permission.getUserName())<br>
#end
#end
</td>
</tr>
#end
#end
</table> 

1 answer

0 votes
Augustin Luton October 18, 2023

This error message is displayed when editing the user macro:

User Macro display-all-spaces may use context keys [ spaceManager, req ] 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.

Suggest an answer

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

Atlassian Community Events