Issue #2: Images Disappear after applying Grid Format

Issue #2: Images Disappear after applying Grid Format

by Greg Barber -
Number of replies: 6

Hi,

Having now successfully installed the grid format and having applied it to one of my courses, all of the images are now broken.  Looking at the source code of the page, part of the src attribute is being replaced with the string "@@PLUGINFILE@@".

Putting the course back into topics format restores the images and the links.

Any ideas what might be causing this?

 

Greg 

Average of ratings: -
In reply to Greg Barber

Re: Issue #2: Images Disappear after applying Grid Format

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Greg,

Please could you post a screen shot of the issue and source code to help.  And the entire contents of Moodle's and Grid's 'version.php' files.

I just tested with '2.2.2' of the Grid format and it seems fine.

Edit: Humm, only version 2.2 is available in the plugin's DB and 2.2.2 in GitHub.  Edit Two: Now put version 2.2.2 in the plugin's DB - https://moodle.org/plugins/pluginversion.php?id=3161 - not sure what happened there.  This version probably won't fix the issue, but does have the working backup / restore code and makes it easier to test this issue.

Cheers,

Gareth

In reply to Greg Barber

Re: Issue #2: Images Disappear after applying Grid Format

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Greg - do you have Gareth's latest version of the plugin?

I seem to remember this was an issue for me earlier in the (academic) year, but that updating the code during the year, at one of the points when Gareth did a lot of work on it, had fixed the issue. I'm sorry I can't remember what the version numbers I was using at the time were, although my main site Moodle which is where the problems were is running 2.3.

@Gareth - I seem to remember a couple of forum posts with you about this, maybe 8-10 months ago, and you fixed it (or at least when I updated the code at one point it stopped happening) but I've looked and can't find those posts at the moment to provide any clues about when, or what the fix was, sorry.

R

In reply to Richard Oelmann

Re: Issue #2: Images Disappear after applying Grid Format

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

@Richard,

Ta - I cannot remember too!  So on the basis that the latest code was not published on the Plugin's DB then it should be and if it has a bug then it needs to be fixed in that version.

Cheers,

Gareth

In reply to Greg Barber

Re: Issue #2: Images Disappear after applying Grid Format

by Marina Glancy -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Greg, FYI "@@PLUGINFILE@@" - is how moodle stores links to embedded files. Course format (or whoever is responsible for displaying this piece of text) must call function file_rewrite_pluginfile_urls() before rendering the text. 

It is not correct to say that "the src attribute is being replaced with the ...", it is happening vice versa - course format is NOT replacing the internal references.

At the same time the only place I can see where the course format is responsible for displaying the text are the sections descriptions. I guess you are talking about them

PS Gareth, I'm sure there is nothing new for you in it, I was just explaining to Greg smile

Average of ratings: Useful (1)
In reply to Marina Glancy

Re: Issue #2: Images Disappear after applying Grid Format

by Greg Barber -

Hi Guys,

Thanks for all the responses.  The updated plugin version appears to have fixed the problem.

Regards

Greg

In reply to Greg Barber

Re: Issue #2: Images Disappear after applying Grid Format

by Nadav Kavalerchik -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks for the fix!

(Just found out we had that issue too)