We have a completely reproducible case where if you insert one of our dynamic macros, but cancel the insert, then reinsert the macro and save the macro, the macro placeholder shows up on the page, but when the page is saved/updated, the macro fails to show up on the updated page.
In both cases we are calling the Confluence closeMacroEditor(), but in the save case we are also calling the confluence saveMacro(macroParams). This seems like a Confluence bug, not sure anything we are doing can cause this to occur.
Found an absolutely repeatable pattern to this.
Starting from a blank page (either published or not):
Start to insert our dynamic macro
After interacting with our custom editor, instead of saving, press Cancel. This calls closeMacroEditor(), which also closes our custom editor dialog.
Staying in page edit mode, insert another macro, this time saving the instance to the page. This calls saveMacro() followed by closeMacroEditor(), which also closes our custom editor dialog.
The macro image placeholder will appear in edit mode, but when the
page is submitted by pressing Update, the macro instance is missing.
Going back into the page edit mode confirms that it’s not there.