Dear community,
In the past, we had a user macro which showed us the incoming links to a page.
A simple code snippet can look like this (waayyy reduced):
01: #set($incLinks = $action.getIncomingLinks())
02: #foreach ($incLink in $incLinks)
03: $inkLink.getSourceContent()
04: #end
After updating to Confluence 9.2.0 Data Center recently, this doesn't work anymore. This doesn't seem to be related to the Velocity macro security settings introduced way back. I don't see how since we are just calling a method on an POJO from Velocity.
Line 01: works
Line 02: works
Line 03: well... if we do a .getClass() on it, it returns "com.atlassian.confluence.links.OutgoingLink", as expected. However, all the methods - expect getId() and toString() - return ... nothing / null.
Since when can't we call methods from velocity on a POJO in Confluence anymore? Is there any workaround besides creating our own plugin in for this simple functionality?
toString even gives a text representation of the link like "<space key>:<page title>". It isn't that the object is empty.
To make matters weird: the "<space key>:<page title>" isn't even the one from the link. Rather it is the page itself. Why? ¯\_(ツ)_/¯
Any advice is appreciated
Janek
PS: I know there are plenty of payed plugins on the marketplace for this. But come on: no sales pitch here. This is such a simple functionality that paying for it seems like a rip off. Especially since user macro solved this for free for the last 20 years. ;-)