When more than one macro is inserted onto a Confluence page with the same parameter data, only the first macro will render with its expected body content. The sample macro listed below includes no parameters as this is the simplest way to reproduce the same behaviour.
Reproduction steps:
- Create a basic connect app which includes the following dynamic content macro:
{
"key": "bananamacro",
"name": {
"value": "Banana"
},
"url": "/macro/banana.html",
"description": {
"value": "Yellow banana"
},
"outputType": "block",
"bodyType": "none"
}
- Use the following html for banana.html:
<!DOCTYPE html>
<html>
<head>
<!-- HEAD -->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Cache-control" content="no-cache,no-store">
<title>Banana</title>
<script src="https://connect-cdn.atl-paas.net/all.js" type="text/javascript"></script>
</head>
<body>
<p id="banana-container" class="inline-paragraph">
Loading...
</p>
</body>
</html>
- Install the app
- Edit a confluence page and insert the macro twice
- Without publishing, observe the result while still in edit mode
Expected Result
Both macros render normally
Actual Result
The first macro renders normally, while any subsequent macros appear broken with no body (see screenshot)
Inspecting the page elements, I believe this could be perhaps related to Confluence assigning the same id to the divs which contain the iframe (see screenshot)
After publishing the page and observing the macros in view mode, these ids are different and the macros render as expected.