** Changed in: mahara/22.04
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1957725
Title:
Embedded images not copied when page is copied
Status in Mahara:
Fix Released
Status in Mahara 20.10 series:
Fix Released
Status in Mahara 21.04 series:
Fix Released
Status in Mahara 21.10 series:
Fix Released
Status in Mahara 22.04 series:
Fix Released
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/lib/group.php line 3268
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-ridley-jR4Zf-riEjI-unsplash.jpg"
src="http://domain/artefact/file/download.php?file=140&view=8&embedded=1&text=25"
width="640">
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-ridley-jR4Zf-riEjI-unsplash.jpg"
src="http://domain/artefact/file/download.php?file=140&view=10&embedded=1&text=25"
width="640"> which shows that the file URL and the 'text=25' (the block
instance) has not changed. Only the view ID has changed. Also, that image is
not copied into the group's files area whereas the image from the image block
is found there.
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-ridley-jR4Zf-riEjI-unsplash.jpg"
src="http://mahara.anitsirk.wgtn.cat-it.co.nz/artefact/file/download.php?file=140&view=12&embedded=1&text=25"
width="640"> which shows that the file URL and the 'text=25' (the block
instance) has not changed. Only the view ID has changed. Also, that image is
not copied into the group's files area whereas the image from the image block
is found there.
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-ridley-jR4Zf-riEjI-unsplash.jpg"
src="http://domain/artefact/file/download.php?file=140&view=8&embedded=1&text=25"
width="640">
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-ridley-jR4Zf-riEjI-unsplash.jpg"
src="http://domain/artefact/file/download.php?file=140&view=10&embedded=1&text=25"
width="640"> which shows that the file URL and the 'text=25' (the block
instance) has not changed. Only the view ID has changed. Also, that image is
not copied into the group's files area whereas the image from the image block
is found there.
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1957725/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to : [email protected]
Unsubscribe : https://launchpad.net/~mahara-contributors
More help : https://help.launchpad.net/ListHelp