Broken images in 2.5.1

Broken images in 2.5.1

Art Lader發表於
Number of replies: 27

Greetings Fellow Moodlers,

Well, this is odd. My images are breaking in an installation of Moodle that has been fine until now (version 2.5.1).

Where I had been seeing images, I am now seeing html like this:

www.ahsgerman.com/vle/pluginfile.php?file=/110/mod_book/chapter/27/sophias%20pictures%201.jpg" alt="sophia 1" height="320" width="240" />

www.ahsgerman.com/vle/pluginfile.php?file=/110/mod_book/chapter/27/sophias%20pictures%202.jpg" alt="sophia 2" style="border: 2px solid black;" height="320" width="240" />

www.ahsgerman.com/vle/pluginfile.php?file=/110/mod_book/chapter/27/sophias%20pictures%203.jpg" alt="sophia 3" style="border: 2px solid black;" height="320" width="240" />

www.ahsgerman.com/vle/pluginfile.php?file=/110/mod_book/chapter/27/sophias%20pictures%204.jpg" alt="sophia 4" style="border: 2px solid black;" height="240" width="320" />

www.ahsgerman.com/vle/pluginfile.php?file=/110/mod_book/chapter/27/sophias%20pictures%205.jpg" alt="sophia 5" style="border: 2px solid black;" height="240" width="320" />

I installed another instance of 2.5.1 on the same server and did not have this problem, by the way.

I have looked for strange entries in the database, but have not found any.

Have been playing with various settings, but have had no luck.

I have tried changing themes, but that did not help.

I am seeing this everywhere including the forums, but not when I attach an image to a forum post. Attached images are not broken.

Have any of you run into this before? Do you have any advice for me?

Thanks,

Art

 

評比平均分數: -
In reply to Art Lader

Re: Broken images in 2.5.1

Luis de Vasconcelos發表於
Particularly helpful Moodlers的相片

That's interesting...

What happens when you turn off the Use slash arguments option under Site administration / Server / HTTP?

評比平均分數:Useful (1)
In reply to Luis de Vasconcelos

Re: Broken images in 2.5.1

Art Lader發表於

Hi, Luis,

Thanks for getting back to me.

Forgot to mention that I have already turned off slash arguments.

Art

In reply to Art Lader

Re: Broken images in 2.5.1

Scott Karren發表於

Art

I took a look at your website and noticed a funny thing.  If I go to the course in the screenshot below I see a broken image (fyi, I am using Chrome).

 

If I right click on the image and select "open image in new tab" I get a redirect message and am taken to the home page of your site.

 

Is it possible that something on the network has changed?

HTH

Scott

評比平均分數:Useful (1)
In reply to Scott Karren

Re: Broken images in 2.5.1

Art Lader發表於

Hi, Scott,

You are right. I noticed that, too. I keep playing around with the HTML, but it does not help.

The fragments do contain the "www" bit: 

www.ahsgerman.com/vle/pluginfile.php?file=/110/mod_book/chapter/27/sophias%20pictures%201.jpg" alt="sophia 1" height="320" width="240" />

Profile pictures show up. Attachment images show up.

Weird, isn't it?

Thanks,
Art

In reply to Art Lader

Re: Broken images in 2.5.1

Art Lader發表於

Okay, let's try this: I am going to re-upload all the Moodle files and copy over the config file to the new installation. Maybe it will be that easy. 

Art

In reply to Art Lader

Re: Broken images in 2.5.1

Ken Task發表於
Particularly helpful Moodlers的相片

Only other thing (thanks for listing all the things you've tried) ... purge the cache.  If the other 2.5.1 site you installed works in another instance in the same environment, the only diff in environments might be the cache.

'spirit of sharing', Ken

評比平均分數:Useful (1)
In reply to Ken Task

Re: Broken images in 2.5.1

Art Lader發表於

Duh. 臉紅

Why have I not done that yet?

Thanks,

Art

In reply to Art Lader

Re: Broken images in 2.5.1

Art Lader發表於

Grrr... No joy, I am afraid.

Art

In reply to Art Lader

Re: Broken images in 2.5.1

Luis de Vasconcelos發表於
Particularly helpful Moodlers的相片

Right-click on one of the "red-cross" placeholders on http://www.ahsgerman.com/vle/mod/book/view.php?id=34&chapterid=27 and it shows a strange, invalid URL like:

http://%3ca%20href=/

Which translates to:

http://< href=/

and isn't valid. So something is breaking your url's.

評比平均分數:Useful (1)
In reply to Luis de Vasconcelos

Re: Broken images in 2.5.1

Scott Karren發表於

What happens if you put a new image and link up?  Do you get the same mangled href or does it work?  If the new file and link work then I would start looking at the database records for those files affected.

If it doesn't work...Hmm... have you checked the config changes report to see if anything has been changed other than what you have done? I still wonder if something has changed on your network side that would be affecting the hrefs.

Scott

評比平均分數:Useful (1)
In reply to Scott Karren

Re: Broken images in 2.5.1

Art Lader發表於
In reply to Art Lader

Re: Broken images in 2.5.1

Art Lader發表於

Not happening on my Wordpress sites on the same server. 死心

In reply to Art Lader

Re: Broken images in 2.5.1

Scott Karren發表於

Art

I just re-read your original post and I want to back up for a minute.  You say this was working fine until 2.5.1, did you recently upgrade?  

Then you said that you setup another 2.5.1 instance and did not have the same issues. Did you use the same downloaded files or did you re-download?

What would happen if you took the filebase from the instance that was working and copied them to the one that isn't, or downloaded 2.5.1 again and copied it into the instance that isn't working?

Maybe I'm grasping at straws right now but is it possible that the download was corrupt?

Scott

評比平均分數:Useful (1)
In reply to Scott Karren

Re: Broken images in 2.5.1

Art Lader發表於

Actually, I set up an instance of Moodle using Scriptalicious and copied over the config file from the original Moodle to the new one.

I think I am going to wait until tomorrow and and take another shot at it with fresh eyes, Scott.

Thank you so much for working with me on this! I very much appreciate it.

Regards,
Art

In reply to Art Lader

Re: Broken images in 2.5.1

Christian Herman發表於

Another Moodler had similar weird code changes due to the HTML filter getting turned on.  I assume you're only having the problem with images added via the text editor?

https://moodle.org/mod/forum/discuss.php?d=231543#p1006860

評比平均分數:Useful (1)
In reply to Christian Herman

Re: Broken images in 2.5.1

Dan Marsden發表於
Core developers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片 Plugins guardians的相片 Testers的相片 Translators的相片

yeah - it's an issue with the filters - one of our clients reported an issue yesterday so I disabled that filter and it fixed it. I'll take another look today and log an issue.

評比平均分數:Useful (2)
In reply to Dan Marsden

Re: Broken images in 2.5.1

Dan Marsden發表於
Core developers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片 Plugins guardians的相片 Testers的相片 Translators的相片

the cause appears to be the patch in MDL-22390

評比平均分數:Useful (2)
In reply to Dan Marsden

Re: Broken images in 2.5.1

Dan Marsden發表於
Core developers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片 Plugins guardians的相片 Testers的相片 Translators的相片

bug report for this issue here: MDL-40633

評比平均分數:Useful (2)
In reply to Dan Marsden

Re: Broken images in 2.5.1

Tim Hunt發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片

OK, I have done a fix for MDL-40633. If anyone can test that patch before it gets integrated next week, that would be very helpful.

In reply to Tim Hunt

Re: Broken images in 2.5.1

Art Lader發表於
In reply to Art Lader

Re: Broken images in 2.5.1

Art Lader發表於

Sigh... Images are breaking again.

In reply to Art Lader

Re: Broken images in 2.5.1

Art Lader發表於

Never mind. Applied suggested fix to filter.php and all is well.

In reply to Art Lader

Re: Broken images in 2.5.1

sid hashem發表於
ello All I am setting up a site for a friend in moodle. We want to make a page for student and after login they are directed to that page. At present, any registered user will see the same page, that is homepage, as they login. We want this to be changed and if a student logs in they are directed to a Page that I have created with some instruction in it. Is there anyway to do this. Kind regards Sid
In reply to Christian Herman

Re: Broken images in 2.5.1

Art Lader發表於

"... only having the problem with images added via the text editor?"

Yes, that is right, Christian.