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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,675
Community Members
 
Community Events
184
Community Groups

User Macro's from Confluence Server not working in Confluence Datacenter

Hello,

I'm currently using a Confluence Data Center trial license and discovered the following:

The user macro's made under Confluence Server aren't working in Confluence Data Center 7.19.7.

Can't figure it out;
any ideas how to solve this?

5 answers

1 accepted

3 votes
Answer accepted

This is most likely the bug causing the user macro issues: https://jira.atlassian.com/browse/CONFSERVER-82741

2 votes
Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 18, 2023

Hi @Keimpe de Jong is there anything in the user macros that points to the old server?  Re icon URL ?

Hello @Craig Nodwell no reference to any server. I'll share the user macro(s) in a reply.

1 vote
Radek Dostál
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.
Apr 18, 2023

Server and DC share the same code base. Whatever the problem is, it's not because of data center. As far as problem reports go, this is extremely poor because you provided no code, no errors, no context, so all we can do is guess.

The aim of my question is to get in touch with other community members who have experience with failing user macro's moving from Server to Data Center.
That's why I didn't provide the failing user macro.

Thanks for your answer.

This User Macro is used to create a custom page listing a specific set of global active spaces.
In the near future a filter on the space category has to be added.

Example of a failing User Macro in Confluence Data Center:

## @noparams
#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($spaces = $spaceManager.getAllSpaces())

#foreach($space in $spaces)

##uitsluiten personal en archived spaces
#if( $space.isPersonal() or $space.isArchived() )
#else

<tr>
<ul>
<td><li><a id="spacelink-spacekey" href="/display/$space.Key" target="_top">$space.Name</a></li></td>
</ul>
</tr>
#end
#end

Any ideas?

0 votes
Bill Bailey
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.
Apr 18, 2023

Were your macros written for an older version of Confluence? I had a number of user macros that when moving from server 6.13 to 7.4, did not work fully. It was because some of the classes had been deprecated.

I also noticed that for inexplicable reasons, Atlassian restricted some access for user macros (restricted some methods from the Velocity context). So for example setting content properties was restricted.

Do you know what is failing in your macros? Have you checked the logs to see if there is a clue in there?

I don't know what too look for and in which log due to lack of experience with failing user macro's.

Can you point the way?

Bill Bailey
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.
Apr 19, 2023

From the admin console, you can download the logs. The best steps to find an issue is:

  1. Refresh the page with the failing macro. Note the page ID
  2. Generate and download the latest logs.
  3. Search for the page ID (or failing that, work backwards looking at time stamps).
  4. You should see some warning, error messages that may point to specific classes by unknown/unrecognized.

What was the server version where the macro was working?

Like Keimpe de Jong likes this

Server version was 7.19.3

From the logs:

2023-04-19 17:18:33,431 ERROR [http-nio-8090-exec-3] [renderer.internal.http.HttpClientFetcher] fetch Unable to perform a request to: https://confluence base  url/ rest/gadgets/1.0/g/messagebundle/und/gadget.common%2Cgadget.activity.stream
-- referer: https://confluence base url/ display/Space key/Page name | url: /plugins/macrobrowser/browse-macros.action | traceId: eca4029d328f4ef0 | userName: **** | action: browse-macros
org.apache.http.conn.ConnectTimeoutException: Connect to confluence base url:443 [confluence base url/IP adress] failed: connect timed out

Bill Bailey
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.
Apr 26, 2023 • edited

Looks like there was some configuration change that blocking the requests. Did the URL change, or is rest socket not enabled? Or is the user credentials the macro using active?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events