Testing upgrade from Confluence 3.4.3 to 4.0beta

Hello, I'm testing this new version and i'm having some problems. The user macros are not working anymore after the upgrade, i have this message: "There are user macros without any metadata configured in their template. They have been highlighted below."

Also, all the plugins that i have, it seems that i don't have them anymore.

Help, please... Thanks in advance.

2 answers

0 vote
David Simpson Community Champion Sep 05, 2011

The meta data for user macros is that stuff at the top of the macro in comments. Without the metadata, Confluence 4 does not know how to display the macro parameters in the macro browser

The example macro below has 2 parameters, one of which is optional.

## Macro title: My Macro
## Macro has a body: N
## Body processing: Selected body processing option
## Output: Selected output option
## Developed by: My Name
## Date created: dd/mm/yyyy
## Installed by: My Name

## This is an example macro
## @param Name:title=Name|type=string|required=true|desc=Your name
## @param Colour:title=Favourite Colour|type=enum|enumValues=red,green,blue|default=red|desc=Choose your favourite colour

Hello, <font color="$paramColour">$paramName</font>!

David Simpson Community Champion Sep 05, 2011

BTW: Don't use the font tag :(

Hello, thanks for your help but it is not working. I've added those coments at the top of the macro and it's still showing the same message. What i'm doing wrong?

0 vote
David Simpson Community Champion Sep 06, 2011
Plesse add an example user macro that doesn't work on C4

Hello, this is what i'm trying to use:

## General variables needed for this user macro - do not change

#set ($remoteUser = $action.remoteUser)

#set ($staticResourcePrefix = $webResourceManager.getStaticResourcePrefix())

#set ($categCounter = 0)


## MODIFY - CUSTOMIZE TO YOUR NEEDS (only 2 variables)

## Enter category names, example: ["Categ 1", "Categ 2"]

#set ( $categoryNames = ["Public", "AESS Group", "Project", "Archive"] )


Enter spacekeys for each category

-> the number of entries must be the same as the number of categories specified in the var $categoryNames

-> the keys of the map must be named the same as the category names in the $categoryNames variable


#set ( $spaceCategories = {} )

$spaceCategories.put("Public", ["SPACE_KEY"])

$spaceCategories.put("AESS Group", ["SPACE_KEY"])

$spaceCategories.put("Project", ["SPACE_KEY"])

$spaceCategories.put("Archive", ["SPACE_KEY"])

It created different categories for the spaces on the dashboard. I don't understand why is this not working anymore on this version. Any clue?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

913 views 23 12
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you