Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

can't use contentPropertyManager anymore in user macro since 7.0.3

Hauke Hörhold
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2019

Hi,

I can't use contentPropertyManager anymore in user macros since i updated Confluence to 7.0.3.

Why?

I'm accessing contentPropertyManager like this:

#set ($containerManagerClass=$content.class.forName('com.atlassian.spring.container.ContainerManager'))
#set ($getInstanceMethod=$containerManagerClass.getDeclaredMethod('getInstance',null))
#set ($containerManager=$getInstanceMethod.invoke(null,null))
#set ($containerContext=$containerManager.containerContext)
#set ($contentPropertyManager=$containerContext.getComponent('contentPropertyManager'))

$contentPropertyManager.setStringProperty($content, "myProperty", "Stuff")

what i get is the plain line of code "$contentPropertyManager.setStringProperty($content, "myProperty", "Stuff")" as a string... in earlier versions it rendered the contentPropertyManager value i was asking for...

1 answer

1 accepted

1 vote
Answer accepted
Hauke Hörhold
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2019
Dominic Lagger
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 18, 2020

Thanks a lot! It helped me! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events