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?
This is most likely the bug causing the user macro issues: https://jira.atlassian.com/browse/CONFSERVER-82741
Hi @Keimpe de Jong is there anything in the user macros that points to the old server? Re icon URL ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Radek Dostál - I have the same issue for a user macro designed to show date last modified. It is no longer working. Any suggestions?
## @noparams Last Modified: $action.dateFormatter.formatDateTime($content.lastModificationDate)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From the admin console, you can download the logs. The best steps to find an issue is:
What was the server version where the macro was working?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.