Linking from Images Not working

Linking from Images Not working

by Michael Winter -
Number of replies: 16

I am having a problem where I can't link from images unless I do it in HTML mode. Links from text are fine but when I go to link a picture to anything it doesn't work.

When you press OK to save the link the only thing it does (in Internet Eplorer) is come up with the small error on bottom left of the browser. Click on that and it says errors on page and this is the error.

Line: 1349
Char: 9
Error: Object doesn't support this property or method
Code: 0
URL: http://servername/course/mod.php?update=1852&return=true&sesskey=nCkpJ6D4w

 

I have tried with debugging on and no error comes up. If you manually type the code into the HTML editor it works fine.

Any Ideas as to what is going wrong ?

Thanks

Michael

Average of ratings: -
In reply to Michael Winter

Re: Linking from Images Not working

by Clarence Prudhoe -

Michael,

I have having the same problem.  I have tried it in both Moodle 1.6.3 and in Moodle 1.7 latest version.

It appears that the HTML editor will not tag an image with a link.

Clarence

In reply to Michael Winter

Re: Linking from Images Not working

by Dr S Bhatia -
Hello

First: you must state that WHERE is this problem occurring? in quiz, lesson, resource web page, where?

I beg to differ with your experience.

i have tested this image insertion and its linking on:
quiz- works fine
Web page- works fine
Frontpage summary- works fine

where, o where is it not working.

Please mention the following too:
  • your moodle version
  • php version and platform
  • where are the images located
  • when you say it doesnt work are you trying them from your login or student login
In reply to Dr S Bhatia

Re: Linking from Images Not working

by Michael Winter -

Thanks for offering to help

It is happening when I create a web page and I am logged in as admin or as an user in the admin group. Images are in the root of the courses files.

Here are my specs

Moodle -  1.6.1+ (2006050511)
PHP - 5.1.2
Mysql - 5.0.22
OS - Windows 2003 IIS 6



 

In reply to Michael Winter

Re: Linking from Images Not working

by Tim Allen -
Do you mean to say that is doesn't happen when you are logged in to a non-admin account?

T.
In reply to Tim Allen

Re: Linking from Images Not working

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
happens for me too - when logged in as an admin. - I get a JS error when using IE 6  doesn't work right using IE 7 either..... I'm going to try to trace this one further - has anyone logged a bug?

smile

Dan 
In reply to Dan Marsden

Re: Linking from Images Not working

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Just created bug MDL-7043 for this issue.

In reply to Dan Marsden

Re: Linking from Images Not working

by Remmert de Vroome -
Hi Dan,

I've reported earlier what may be the same issue (in Firefox/Mozilla browsers) via MDL-6720. See also MDL-1791 which describes the same symptoms in Moodle v1.4, and which was actually fixed back then in time for v1.5.

Cheers,
Remmert
In reply to Dan Marsden

Re: Linking from Images Not working

by James Hanks -

Was there a solution to hyperlinking an image in IE6? I am finding quite frustrating.

Thanks for your time

In reply to James Hanks

Re: Linking from Images Not working

by Remmert de Vroome -
Hi Everyone,

I'm not sure if this is directly related to the bug I reported earlier (see fault no. MDL-6720 in the Bug Tracker) re hyperlinking images using the editing buttons in the HTML Editor. We're using Firefox/ Mozilla as our browsers at the college (on both Mac & PC), and we cannot link to images either. It will link fine to text. This issue appeared after we upgraded to Moodle v1.6.1+ and it's also present in 1.6.3. It worked ok in v 1.5.

I've setup a temporary workaround for us here until such time as the bug is fixed, please see below.

"At present, Moodle will only allow links to be made directly to portions of text, not images.
In order to link an image inserted in a Moodle editable space to a file or website, a temporary workaround is needed. The steps are as follows:
  1. Insert an image in the location where you want it using the HTML Editor
  2. Select it, and click on the Link button
  3. Enter the URL (or browse and then enter the URL) for the file/ website
  4. Now only the Alternate Text that was previously typed in for the image will be displayed. This text is what is actually linked to the file/website
  5. Select the text shown
  6. Click on the Link button again and re-insert the image. The image itself is now linked to the selected file/website "
I tried my method out again on IE 6 just now, but am having problems on my machine, so I'm not sure. I hope this does work for all of you using IE 6.

Cheers,
Remmert
In reply to Remmert de Vroome

Re: Linking from Images Not working

by Gaston B. Hotton -
Bonjour to you all!
I have experienced this problem yesterday for the first time(in 3 years) after upgrading to Moodle 1.7
Was irrationel, (working here,not working there-mostly on the front page). I have relink the pictures and now it is fine!
I don't know if this could be of any help to you?

Salut

Gaston

_-------_____-------______
Moodle: vers.1.7
Platforms: WindowXP and MacOS 10.4.8
Server: Linux, Apache
Browsers: FireFox,Safari,IE,Camino

In reply to Remmert de Vroome

Re: Linking from Images Not working

by Teresa Gibbison -
I previously tried to link to images with no luck (above post) in Firefox 2.0. I have just tried to link to an image using IE 6.0.xx with a slightly different error:

Inserting the image is fine, I click the Insert Link icon an the dialog box appears, I insert the URL details, Title etc. When I click "OK" the dialog box stays open and an error appears on the parent window status bar.

The error says:
Line 1346
Char: 9
Error: Object doesn't support this property or method
Code: 0
URL: http://mymoodlesite/course/mod.php?
update=131&return=true&sesskey=HvkHr8R21f

I click OK and the image remains but with NO link...

Moodle 1.7
PHP Version 5.1.6
running on my WinXP machine
In reply to Teresa Gibbison

Re: Linking from Images Not working

by Russ Maurer -
Putting in the link first, then the image works reliably for me in FF 1.5:
1. Put in a bit of text as a placeholder (it will disappear in the end).
2. Select the text and link it to the URL you want.
3. While still in the HTML editor, select the same text AGAIN. Now click on the Add Image icon and select the image file you want.
4. Save

You should now see the image, and it will link to the URL.

Alas, the same sequence fails miserably in IE 6.0. Good luck with that, but at least the FF folks have a solution.

Russ
In reply to Russ Maurer

Re: Linking from Images Not working

by Neil Johnson -
I tried this solution to no avail and am using version 1.7. Any other suggestions.
In reply to Remmert de Vroome

Re: Linking from Images Not working

by Matthew Westfall -
Thanks Rement,

I happened upon this post and you answered exactly what I was looking for. I had the videos on my site already linked to text and just had to replace the text with the inserted image and it linked the jpeg directly to my video...perfect. Thank you very much!

Matt
In reply to James Hanks

Re: Linking from Images Not working

by Gabriela Alpirez -
Hi everyone:
Unfortunately the fix presented by Remmert works only when editing in Firefox, the good news is that it WORKS!! Once it has been fixed, IE will displayed it ok.
Thanks Remmert for your support.