Images not shown after upgrade

Images not shown after upgrade

by Uwe Klemm -
Number of replies: 10

Hi,

we are experiencing a somewhat weird problem: after upgrading to 2.4.4+ (not sure whether there is any connection...) images are not displayed properly. This refers to images in text fields, text areas, forum entries, html blocks etc. Instead of the images, you just get the html with the path to the images. Strangely, if you open the respective resource in the editor, the images are shown in the images! Standard icons etc are not affected.
Here's a screenshot: screenshot

We are using bootstrap as a theme, but the same behaviour is visible in our mobile theme.

Any idea?

 

Thanks, Uwe

Average of ratings: -
In reply to Uwe Klemm

Re: Images not shown after upgrade

by Christos Patsatzis -

Hello Uwe,

I faced the exact problem when migrating from one server to another. 

I solved it with the info in this thread https://moodle.org/mod/forum/discuss.php?d=188787

Not sure if it is the same problem, but it has exactly the same behaviour. 

Chris

In reply to Christos Patsatzis

Re: Images not shown after upgrade

by Uwe Klemm -

Thanks, but this didn't solve the problem, unfortunately.

It seems that only images are affected that have been inserted via the editor. Something strange seems to happen to the html code...

We had Firebug check the code, one example looks like this:

<p id="yui_3_7_3_2_1372753379916_261">Unsere Plattform ist auf die neue Moodle-Version 2.4 aktualisiert worden. <img class="_blanktarget" system-software-update.png"="" 12681="" post="" mod_forum="" 44="" pluginfile.php="" moodle="" www.mz.jena.de="" http:="" src="http://<a href=">www.mz.jena.de/moodle/pluginfile.php/44/mod_forum/post/12681/system-software-update.png" width="128" height="128" alt="Update" style="float: right; margin: 5px;" /

 

Another example from a block: 

<img class="_blanktarget" newticket.png"="" img="" helpdesk="" www.mz.jena.de="" http:="" src="http://<a href=">
 
Any ideas? We're kind of lost here...
Thanks, Uwe

 

 

In reply to Uwe Klemm

Re: Images not shown after upgrade

by Christian Herman -

Is it only affecting new images added after the upgrade?

If you upload an image as a file resource does it display properly?

If both answers are 'yes', you may want to download a fresh copy of the 2.4.4 code and replace your installation's TinyMCE folder (/moodle/lib/editor/) with the fresh copy.

In reply to Christian Herman

Re: Images not shown after upgrade

by Uwe Klemm -

Christian, 

thanks for the hint. But no - a lot of images are affected that have benn there forever...

In reply to Christian Herman

Re: Images not shown after upgrade

by Uwe Klemm -

Christian, 

thanks for the hint. But no - a lot of images are affected that have benn there forever...

In reply to Uwe Klemm

Re: Images not shown after upgrade

by Floyd Saner -

The html code seems to have errors:

The '>' shown in red below should be at the end of the line:

src="http://<a href=">www.mz.jena.de/moodle/pluginfile.php/44/mod_forum/post/12681/system-software-update.png" width="128" height="128" alt="Update" style="float: right; margin: 5px;"

Change to:  

src="http://<a href="www.mz.jena.de/moodle/pluginfile.php/44/mod_forum/post/12681/system-software-update.png" width="128" height="128" alt="Update" style="float: right; margin: 5px;">

There may also be other errors, but that one looks obvious.

In reply to Floyd Saner

Re: Images not shown after upgrade

by Uwe Klemm -

Floyd -

thanks. We've seen these (and other) errors, of course. The question would be: What the hell causes them? Why would code that has been oK for a long time suddenly become so garbled? We can't possibly fix all the code manually, there are several hundred courses in our Moodle instance. Very strange...

In reply to Uwe Klemm

Re: Images not shown after upgrade

by Floyd Saner -

Sorry Uwe, but I have no clue about the 'why' question! If other people have experienced this it should be logged in the bug tracker.

-Floyd

In reply to Floyd Saner

Re: Images not shown after upgrade

by Uwe Klemm -

Thanks again. Fortunately, it turned out not to be a bug. We accidentally activated the html format filter - that caused the problem. Deactivating it helped. I don't have a clue whether this behaviour would be regular if the filter is activated...

Thanks for all the help so far!

Uwe 

In reply to Uwe Klemm

Re: Images not shown after upgrade

by Christian Schett -

Had the same problem. After deactivating html at "showing URL as link or picture" everything works fine again.