I have a Confluence Cloud macro which had a single macro input parameter. I’ve since added 2 more macro input parameters to this macro.
For new instances of the macro, everything works just fine, but for existing instances, you cannot edit them at all.
On editing an instance of the macro, I get this “No macro metadata” modal rather than the proper edit modal:
How can I update the number of macro parameters on a macro without breaking all current places where the macro is being used?
More details of the problem are given here:
Also, having updated to the latest development version, then reverted to the version published on MPAC, the same “No macro metadata” screen is displayed. It’s like the new version pollutes the previous version.
For completeness, here’s the before and after for the macro definition:
Before
"dynamicContentMacros": [
{
"url": "/smiles.html?data={smilesData}",
"description": {
"value": "SMILES Macro"
},
"icon": {
"width": 90,
"height": 90,
"url": "/images/chemistry-toolkit/macro-icon.png"
},
"categories": ["confluence-content"],
"outputType": "block",
"bodyType": "none",
"featured": true,
"key": "SMILES-macro",
"name": {
"value": "SMILES Macro"
},
"parameters": [
{
"identifier": "smilesData",
"name": {
"value": "SMILES Text"
},
"description": {
"value": "Add your SMILES format formula here"
},
"type": "string",
"required": true
}
]
},
...
]
After:
"dynamicContentMacros": [
{
"url": "/smiles.html?data={smilesData}&width={width}&height={height}",
"description": {
"value": "SMILES Macro"
},
"icon": {
"width": 90,
"height": 90,
"url": "/images/chemistry-toolkit/macro-icon.png"
},
"categories": ["confluence-content"],
"outputType": "block",
"bodyType": "none",
"featured": true,
"key": "SMILES-macro",
"name": {
"value": "SMILES Macro"
},
"parameters": [
{
"identifier": "smilesData",
"name": {
"value": "SMILES Text"
},
"description": {
"value": "Add your SMILES format formula here"
},
"type": "string",
"required": true
},
{
"identifier": "width",
"name": {
"value": "Width"
},
"description": {
"value": "In pixels, as an integer e.g. 600"
},
"type": "string",
"required": false
},
{
"identifier": "height",
"name": {
"value": "Height"
},
"description": {
"value": "In pixels, as an integer e.g. 600"
},
"type": "string",
"required": false
}
]
},
...
]
Aside: Are Atlassian are running an unsupported version of Java for Confluence Cloud?
https://confluence.atlassian.com/confkb/no-macro-metadata-errors-347341441.html