← Back to team overview

mahara-contributors team mailing list archive

[Bug 1045138] Re: Image disappears from Page Description when page shared to other users

 

Hi Son,

I'm also getting this issue on master (15.04).  There are 2 scenarios:

1.  /artefact/file/download.php

A file is embedded in any artefact that can have an image embedded (i.e.
'comment', 'blog', 'textbox', 'editnote', 'text').

We need to check EmbeddedImage::can_see_embedded_image() when embedded =
1  and the file is instanceof ArtefactTypeImage.


The code in download.php checks this but only for resume elements and groups.

It also needs to check:
- when 'view' is specified
- when view is not specified and is still not visible after all those other checks.


2. When an artefact/block is deleted from a view, it uses:

EmbeddedImage::delete_embedded_images()

which deletes based on the fileid.

So, if the fileid is used in more than one place by the user, it will
delete all records in the 'artefact_file_embedded' table.

It should delete based on the resourceid.

I'm not sure what the original business case was for using fileid.
We'll need to investigate further and see where it's required by fileid.


I hope this makes sense.

Thanks,
Ghada

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1045138

Title:
  Image disappears from Page Description when page shared to other users

Status in Mahara ePortfolio:
  In Progress
Status in Mahara 1.10 series:
  Confirmed
Status in Mahara 1.8 series:
  Confirmed
Status in Mahara 1.9 series:
  Confirmed

Bug description:
  - exact version of Mahara: 1.4.2 & 1.5 (demo.mahara.org)
  - operating system:  Windows for the 1.4.2 version (I think)
  - database: MySQL (I think)
  - Chrome 20, IE8 & 9, FireFox 13, Safari 5

  If an image is inserted into a Page Description (for example, as a
  decorative heading or title) and then that page is shared by Secret
  URL, the image disappears.

  Any other images, such as those inserted as an image block and those
  inserted inline within a text box, appear without issue.

  I have tested this in our installation of Mahara (1.4.2) and the
  demo.mahara.org version. The screen capture is taken from when I
  tested the demo.mahara.org version. In our version we get identical
  results, where the Page Description image disappears.

  Addendum: if the images are hosted externally, e.g. at Flickr, they
  actually do appear in the Page Description area! It might take a few
  seconds for the image to load, though.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1045138/+subscriptions


References