It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

can't use contentPropertyManager anymore in user macro since 7.0.3 Edited

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
Dominic Lagger Community Leader May 18, 2020

Thanks a lot! It helped me! 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

How To: get the most out of the new Confluence navigation and Home

Hi Community, Elaine again from Confluence Cloud Product Management. Most of you have used the new Confluence navigation and Home for some time by now. Not sure what changed or just want to lear...

480 views 3 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you