I am developing an add-on with a dynamic macro. When the macro loads, it gets a page attachment that contains the data that is needed to render itself. The attachment is retrieved through a page id that is taken from the context provided through AP navigator.getLocation(). When the macro is rendered in the preview page for the Confluence editor, I am seeing very different behavior on two instances of Confluence. Both are build 1000.1070.1 and both use ACJS 5.0.0-beta.41. However, on one of the instance, the page id returned from navigator is the correct page id and the macro renders correctly, while on the other, the page id is a draft id and the macro cannot render because the id is not correct. Looking at the path on the urls, they are different:
works : /wiki/pages/editpage.action?pageId=23540908
does not work : /wiki/pages/resumedraft.action?draftId=2588866&draftShareId=20929c9d-7cb8-4171-abe0-db2d8a4a5888
This also happend when we pass the page.id context parameter. (In the connect documentation, page.id is marked as depricated, but container.id always returns an emtry string, so we user page.id).
As a side note, there are subtle differences in the look of the pages. On the working instance, the save button says “save” while on the one that uses the draft id, the button says “update”.
Why the difference for two instances that appear to be identical?