It looks like $pageManager was removed from the default velocity context so it is no longer available for use in user macros. This has broken a ton of our user macros. Anyone know of a way to get it back or something that can do similar function as it? We used $pageManager.getPage() a lot.
@Davin Studer Atlassian introduced so-called allowlists to Velocity templates, and drastically reduced the objects/methods available for user macros. So, what you see is by design and for security reasons.
(All Confluence apps had to be adjusted for these allowlists.)
I don't know about user macros, but it seems you can add objects to the Velocity context by configuring system properties! See the section "Method allowlist" on this page.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.