Has anyone migrated from pageManager to contentService in velocity

Hello :slight_smile:
Wondering if anyone has successfully used $contentService in velocity templates such as pagenotpermitted.vm

After moving to 9.2 $pageManager returns null - $pageManager.getPage($spaceKey, $pageName)
Edit: pageManager still works in 9.2 - issue was with page name and space characters (getPage doesn’t seem to like + replacing an actual space char)

and using $contentService as per the Java docs I still can’t get page details (or anything for that matter). For example have tested:

$contentService.find(new Expansion('version'), new Expansion('id')).withType(ContentType.PAGE).withTitle($pageName).withSpace($spaceKey).fetch()

and simply

$contentService.find().withTitle($pageName).withSpace($spaceKey).fetch()

with no luck.

Essentially trying to achieve what this user wanted years ago: In User Macro Velocity - How to use ContentService... but still haven’t found any answers