What is changing?
Within the Fabric Editor in preview mode, a dynamic content macro with the plain-text body type will be updated with a new body value.
Related API: Confluence
Why is it changing?
It was a bug. AP.confluence. saveMacro was saving body value but in preview mode macro was not getting updated with the new macro body.
What do I need to do?
Developers can now use AP.confluence.getMacroBody in their app to get updated body values. Make sure the app is plain-text body type.
Hi @TapanParikh Thank you for the update. This is really fantastic news.
We have been waiting for a fix since 2019. As they say, better late than never.
I did a quick check and AP.confluence.getMacroBody function indeed seems to work (i.e it returns the expected latest version). Do you have any timeline when it will be released to all customers?
Thanks for reaching out to us.
Yes, I tried with dynamic macro with plain-text body type with macro editor.
Currently, we have rolled to developer first release cohort. Planning to roll out in prod from Oct 25th in incrementing phases.
Hi, I’m not entirely sure if this is related but it seems like AP.confluence.getMacroData() has stopped working inside a custom macro editor on the same date this fix starts rolling out.
What I can observe is that it only happens inside a custom editor, i.e. calling AP.confluence.getMacroBody() on the exact same dynamic content macro:
returns the macro data correctly in page view and in preview.
returns empty string inside the custom macro editor.
Is this a bug introduced with this fix? Because I couldn’t find any other recent changes on AP.confluence.getMacroBody().
Edit: My original post says getMacroData() whereas I meant getMacroBody(), my mistake.
I tried with the macro editor, it seems to be working fine. Below I have a screen recording, where I am able to update the previous parameter value. I use the below function on the editor to fetch the param value
I’m sorry, I meant getMacroBody() not getMacroData(), I got the two names confused in my original post, sorry for the confusion.
As of current, getMacroBody() still return empty string inside a custom macro editor, althought once in a while I see the macro body loaded properly but almost 99% of the time it returns empty string and I only observed it inside a custom macro editor thus far. Any clue if it’s related?
I can confirm that this has stopped working. We have a private discussion, @TapanParikh, with the demo I have recorded and it was working OK for the plain-text macros (never worked for rich-text)
But now it does not work for the plain-text body macros anymore
The phenomenon pointed out by toshihiro occurs in various macros.
Today I updated a lot of content on Confluence, but the content represented by the macro has been cleared.
I am in great trouble, so I would like you to resolve it as soon as possible.
Hello all, sorry for the issue.
I confirm there is an ongoing issue with the macro editor, we are working on fixing that issue. I Will update once it is fixed.