Embedded images not copied when page is copied
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Doris Tam | ||
20.10 |
Fix Released
|
High
|
Unassigned | ||
21.04 |
Fix Released
|
High
|
Unassigned | ||
21.10 |
Fix Released
|
High
|
Unassigned | ||
22.04 |
Fix Released
|
High
|
Doris Tam |
Bug Description
When an image is embedded into a text block, the image is not copied along for personal or group pages.
This is related to the ToDo item (at least for the group part): Allow copying of the file artefacts in htdocs/
In some cases, the image can still be viewed even when access is not explicitly given to the original page. Therefore, the URLs need to be looked at.
We need to copy the image into the group and also change the reference to the block instance so that it relates to the block instance on the group page.
Note: Do not test as site administrator.
To replicate the issue testing in a group:
1. As Student 1, create a personal page with a text block that contains an image and an image block that contains a *different* image (as control example).
2. Share this page with 'Registered people' and make it copyable.
3. Note down the image tag information for the image embedded in the text block. In my case it was: <img alt="andrew-
4. Create 'Group 1' and copy the page you created into that group.
5. Note down the image information for the embedded image. In my case it was: <img alt="andrew-
6. Share this page with 'Registered people' and make it copyable.
7. Create 'Group 2' and copy the page from group 1 into this group.
8. Note down the image information for the embedded image. In my case it was: <img alt="andrew-
9. Share the page publicly.
10. Remove the sharing permissions for 'Registered people' from Group 1 for the page there.
11. Delete the personal page.
12. View the pages in the groups: They do not contain the image any more because the reference to the original block instance is broken, even though the image still exists in the personal account.
To replicate for personal page:
1. As Student 1, create a personal page with a text block that contains an image and an image block that contains a *different* image (as control example).
2. Share this page with 'Registered people' and make it copyable.
3. Note down the image tag information for the image embedded in the text block. In my case it was: <img alt="andrew-
4. Log in as Student 2.
5. Copy the page into this account.
6. Note down the image information for the embedded image. In my case it was: <img alt="andrew-
7. Share this page with 'Public' and make it copyable.
8. Log in as Student 1 and delete the page (but leaving the artefacts in place).
9. View the page in a private window. The image is missing in the text block.
Patch for "main" branch: https:/ /reviews. mahara. org/12376