More edge cases around the hash generation has cause a few more cases of macros unable to collect their body.
A spike was done to find a better way to calculate and track the macro hash (CE-54), this issue represents applying this new hash generation to make the macro body collection more robust.
I agree that changing the way that the hash will be calculated is a better way to fix this and possibly other similar issues. I will keep an eye on
One reported cause of macro hash being calculated incorrectly:
When you have a JIRA and Confluence OnDemand instance that are linked and have a macro with the content containing something that looks like a JIRA issue reference, so: 'FOO-1' or 'SHA-256'. You get the following error when trying to fetch the macro body content using the '/rest/api/content/<pageid>/history/<pageversion>/macro/hash/<hash>' API.
The error does not occur with things like 'FOO-' or 'SHA-256'.
When I edit macro and insert a simple text in the body all is fine, but if I insert here the table I receive this:
But, if I generate md5 for macro body by myself, I get this:
This is probably caused by confluence changing the storage format of the table markup before calculating the macro hash. The solution in should work here.
Hello, may be you can tell me the latest time you will finish, as our progress has stopped because of this issue.
An update on this issue:
We are hoping to fix a class of these bugs with a simple but fundamental change to how macros are stored by Confluence. I have completed the Confluence part of the changes to do this. Confluence will now generate a random MacroId if one is not specified and will ensure that they are unique on the page. Whats left is to update the macro body retrieval service to use the macro Id if its available and update the Connect macro stubs to pass the macroId on to the addon. The id's are being generated but not currently used yet.
Its my hope that this will eliminate many of the cases of this error message because the pre-calculated and statically stored id will not be affected by transformations in the rendering pipeline.
This change will not fix the confusing error message if the macro body is not available because the add on is not permitted to see the page. Make sure your addon and the user using your adddon (depending on how we're you're calling from) has permission to view the page.