Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Part of user mention goes missing

Steffi S.
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 22, 2018

I'm trying to create a user macro that defines some variables and repeats them in the page wherever necessary.

So I have one macro with body for the definition of the variable:

#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, $paramId, $body)

And one that outputs it again:

$contentPropertyManager.getStringProperty($content, $paramId)

This setup works nicely for any kind of texts and even dates. However when I enter a user mention, it will not be repeated in its entirety.

Only the blue @ is present, and the HTML source code shows

<a data-base-url="http://c" data-hasbody="false" ...> </a>

instead of

<a data-base-url="http://confluence.acme.com" data-hasbody="true" ...>Doe, John</a>

The link still has the correct popup.

What could possible the reason for that behavior? How can I fix it?

 

(I asked this question on StackOverflow as well.)

 

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events