In edit mode, Dynamic Content Macros do not render correctly when they have the same parameter values

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:

  1. 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"
  1. Use the following html for banana.html:
<!DOCTYPE html>
<!-- HEAD -->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Cache-control" content="no-cache,no-store">
<script src="" type="text/javascript"></script>
<p id="banana-container" class="inline-paragraph">
  1. Install the app
  2. Edit a confluence page and insert the macro twice
  3. 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.


I believe this ticket is aimed at the same issue