We’re seeing a consistent problem that the email render mode for a dynamic content macro is receiving a request with an invalid page ID for the previous version from Confluence when the page is updated.
Assumption is Confluence is sending the two requests to generate a diff for the email notification. But the pageId for the second request is not a valid page ID (or at least not the page ID we can look up via the API).
Is this behavior for the email render modes a known issue, or is there something wrong with how we have configured render modes?
atlassian-connect.json excerpt (some lines omitted)
"dynamicContentMacros": [{
"key": "esign-block",
"url": "/static/content-macro.html?view={view}&meanings={meanings}&invites={invites}",
"renderModes": {
"default": {
"url": "/page/content-macro-export?output={outputType}&pageId={page.id}&pageVersion={page.version}"
}
}
...
Access Log Examples (# comments)
# Access log after all actions are on the same confluence page: ID=2745925635
# Pass - View page in confluence site, dynamic macro URL used.
200 GET /static/content-macro.html?view=Compact&meanings=&invites=true&xdm_e...
# Pass - Export to Word.
200 GET /page/content-macro-export?output=word&pageId=2745925635&pageVersion=5&xdm_e...
# Pass - Export to PDF.
200 GET /page/content-macro-export?output=pdf&pageId=2745925635&pageVersion=5&xdm_e...
# Fail - Update (watched) page. Server receives 2 requests, one valid page ID, and one is for a different page ID for the previous version.
200 GET /page/content-macro-export?output=email&pageId=2745925635&pageVersion=6&xdm_e...
404 GET /page/content-macro-export?output=email&pageId=2746023969&pageVersion=5&xdm_e...
# Fail - Update the same watched page again. Same pattern but new invalid secondary page ID
200 GET /page/content-macro-export?output=email&pageId=2745925635&pageVersion=7&xdm_e...
404 GET /page/content-macro-export?output=email&pageId=2746253326&pageVersion=6&xdm_e...
API Request on the provide pageIds:
https://esign-dev.atlassian.net/wiki/rest/api/content/2746253326
404,
com.atlassian.confluence.api.service.exceptions.NotFoundException: No content found with id: 2746253326
Thank you
Chris