Dynamic Content Macro - Preview mode insert/edit behaviour

Hi

I am observing some different behaviour for “Dynamic Content Macro” for my app in preview mode page.

  • When I am first time adding my macro - insert editor open and when I save editor it will close and my preview editor will re-render with my changes.
  • Now if I again edit same macro my editor is open and if I save my data is saved but my editor preview not updated.

I m using below code to close my editor on submit/save.
window.AP.confluence.closeMacroEditor();

@dmorrow is this intended behaviour or it’s existing bug.

Thanks,
Umang

3 Likes

I think this is probably the same issue as described in: [CONFCLOUD-71216] Edit mode leads to the rendering of stale macro data - Create and track feature requests for Atlassian products.

We also see this very often with our macros. To customers this definitely looks like the app is broken when this happens. But I’m not sure if we as app developers can do anything about it. :confused:

Cheers,
Sven

Thanks @sven.schatter for detail. This is defiantly hamper usability of all vendor app. our customer/user think its bug in our vendor app. However this is perfectly working fine with jira created app. ( I hv checked in Jira Macro it’s working perfectly fine with any number of edit every time preview updated )

Jira Macro - developer can help us here - they can suggest some hack to fix. :slight_smile:

@umang.savaliya Unfortunately this is a bug which was discovered more than one year ago and still nothing is done to fix this. It is similar to this onehttps://jira.atlassian.com/browse/CONFCLOUD-70639 or this one [CONFCLOUD-69962] Connect JS AP.getMacroBody does not work in Preview Mode - Create and track feature requests for Atlassian products.

Are you maybe using cacheable iframes for your macro and AP.confluence.getMacroData in your code?
If so then getMacroData will return stale data.

Fixing this would mean switching back to non-cacheable iframes and using URL params for macro params. (at least for us, that’s the case but of course, we would not like to do that)

The least you can do for now is vote on every bug that you find related to this issue and hope that Atlassian decides to fix it :sweat_smile:

1 Like