Details
-
Bug
-
Resolution: Fixed
-
Low
-
1
-
Severity 2 - Major
-
2
-
Description
Issue Summary
There are a few conditions that can lead to this problem:
- Copying a page with body causes the image not be shown on the page.
- Adding an attachment after the page has been created without the image.
Steps to Reproduce
Steps to Reproduce: Case #1 - Page Copy
- create a parent page: <site>/<space>/pages/402325512/DEVHELP-7212+-+parent+page
- create a source page: <site>/<space>/pages/402161672/DEVHELP-7212+-+copy+page+-broken+attachments-+source+page. Notice that the attachment here is called background.png
- copy the page but provide a body with an attachment called image.png
curl --request POST \ --url '<site>/wiki/rest/api/content/402161672/copy' \ --header 'Accept: application/json;charset=UTF-8' \ --header 'Content-Type: application/json' \ --data '{ "copyAttachments": true, "copyPermissions": false, "copyProperties": false, "copyLabels": true, "copyCustomContents": false, "destination": { "type": "parent_page", "value": "402325512" }, "pageTitle": "DEVHELP-7212 - Target Page 1", "body": { "storage": { "representation": "storage", "value": "<ac:image><ri:attachment ri:filename=\"image.png\" ri:version-at-save=\"1\" /></ac:image>" } } }' \ --basic --user '<userEmail>:<token>'
- create another page which is going to be the source for the image: <site>/<space>/pages/402489345/DEVHELP-7212+-+source+page+image+only. The attachment here is called image.png
- copy the new page (the one with the source image) with the existing_page with id 402456577 as the target page
curl --request POST \ --url '<site>/wiki/rest/api/content/402489345/copy' \ --header 'Accept: application/json;charset=UTF-8' \ --header 'Content-Type: application/json' \ --data '{ "copyAttachments": true, "copyPermissions": false, "copyProperties": false, "copyLabels": true, "copyCustomContents": false, "destination": { "type": "existing_page", "value": "402456577" }, "pageTitle": "DEVHELP-7212 - Target Page 1", "body": { "storage": { "representation": "storage", "value": "<ac:image><ri:attachment ri:filename=\"image.png\" ri:version-at-save=\"1\" /></ac:image>" } } }' \ --basic --user '<userEmail>:<token>'
Steps to Reproduce: Case #2 - Adding an attachment at a later stage
- Create a page with a image.png in the body
curl --request POST \ --url '<site>/wiki/rest/api/content' \ --header 'Accept: application/json;charset=UTF-8' \ --header 'Content-Type: application/json' \ --data '{ "type": "page", "title": "DEVHELP-7234-1", "space": { "key": "FIRSTSPACE" }, "ancestors": [{ "type": "page", "id": "98306" }], "body": { "storage": { "value": "<ac:image ac:align=\"center\"><ri:attachment ri:filename=\"image.png\" /></ac:image>", "representation": "storage" } } }' \ --basic --user '<userEmail>:<token>'
- Upload the attachment called image.png
curl -D- \ --url <site>/wiki/rest/api/content/405635073/child/attachment \ -X POST \ -H 'X-Atlassian-Token: nocheck' \ -F 'file=@"image.png"' \ -F 'minorEdit="true"' \ -F 'comment="Example attachment comment"; type=image/png' \ --basic --user '<userEmail>:<token>'
Expected Results
The image on the target page is correctly shown.
Actual Results
The result will be the following on the target page <site>/<space>/pages/402456577/DEVHELP-7212+-+Target+Page+1:
- the image doesn’t show on the page
- the attachments are on the page. Both of them are correct and can be loaded from the Attachments page.
Workaround
If a site is affected, the problem can be addressed by changing a feature flag setting.
Please raise a ticket with the Atlassian customer support team at https://support.atlassian.com/contact/ and mention this ticket so that a support representative can update the relevant feature flag on the site.
Attachments
Issue Links
- is resolved by
-
MODES-1160 Loading...