Edits to checkboxes do not update req.context

We are experiencing an issue with outdated/stale context variables.

When a user adds a checkbox to a page ([]), and toggles the checkbox, the document version is incremented.

When a macro is on the same page and Confluence does a call to the macro host page after a checkbox is toggled, the req.context atlassian-connect-express is getting still shows the content.version from before the checkbox was updated. It seems that a checkbox toggle does not result in the req.context inside the macro being updated.
The above is different from a normal page edit, where after an edit the page and macro are reloaded and req.context is updated with the new document version.

I’m not sure if this is an error in Confluence, or a design decision, or unreasonable expectations on my side? Any help appreciated.

1 Like

When a macro is on the same page and Confluence does a call to the macro host page after a checkbox is toggled, the req.context atlassian-connect-express is getting still shows the content.version from before the checkbox was updated

RE: Edit mode loads stale macro context after the context has been updated

What you mention is the reason why I was unfortunately unable to find workarounds for this stale macro context issue from my post.

It seems that it is actually standard behaviour for macros to retain their context data from the last page version where they were edited, rather than always have an up to date context for the most recent page version.

If that were not the case, it would be possible to code around the stale-context issue by simply inspecting the context and discarding obsolete versions.

I hope we hear from Atlassian on this :slight_smile:

2 Likes