Multi Excerpt User Macro development

Hi, I have been advised by Atlassian Support to raise a request here for advice and guidance.

We have adopted the user of a couple of in-house developed user macros to display content from one page in other pages/spaces (akin to the excerpt macros already available, but with the added benefit that we can reference multiple pieces of content in a single page and use them elsewhere).

Following a recent upgrade of Confluence in line with Atlassian CVE’s, these macros are no longer working.

Previously we would use a multi excerpt macro to define the source content, and then second ‘include multi-excerpt’ to display it in the destination page. We do not receive any errors following the upgrade, but the destination macro is blank.

Following investigations from Atlassian, it appears that this is expected as recent security patches prevent the content from being displayed as velocity objects are no longer exposed. They have recommended specifying the velocity object used in the system property -Dmacro.required.velocity.context.keys but this has not appeared to work.

Is anyone able to recommend any alternative fixes or suggest alternative macros that can be used?

Our basic requirement is to be able to reference multiple individual pieces of content on a Confluence page to be displayed in other pages in the same or other spaces. Alternatively, we may have to start investigating the use of paid for plugins to provide this functionality.