setting multiple links in user profile?

setting multiple links in user profile?

autor David Dailey -
Počet odpovědí: 3

I am new here. I was asked to update my profile so I thought I would comply. I entered an editable text area, much like the one I am using to type this message.

I succeeded in entering a link to a web page much like this one, but when I tried to enter another link, as like this, (highlighting the text and clicking on the "insert web link" icon, the browser (I'm replicating the problem now in IE though I think I was using FF at the time) gave me an "error on page" message. In IE the error resolved to "Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Tue, 3 Aug 2010 21:33:15 UTC



Message: 'length' is null or not an object
Line: 1484
Char: 9
Code: 0
URI: http://moodle.org/lib/editor/htmlarea/htmlarea.php

Průměr hodnocení: -
V odpovědi na David Dailey

Re: setting multiple links in user profile?

autor Mary Cooch (personal account) -
Obrázek: Documentation writers Obrázek: Testers
Hi there. Just to check -were you using Internet Explorer 8? I am aware that there is an issue with doing more than one hyperlink in the html editor in IE8 (which can be resolved if you switch to compatability mode) If you do a search you will find instances of people discovering that annoyance - but I am not aware that it is a problem in FF, as you seem to suggest it might be?
V odpovědi na Mary Cooch (personal account)

Re: setting multiple links in user profile?

autor David Dailey -

I think it must have just been in IE. There is a function called

function getElementsByClassName(oElm, strTagName, oClassNames){
var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
which gets all the elements as a node list and later tries to iterate over them as an array. Don't know  if this is a problem in IE8 for HTML, but it is for SVG.
Was unable to replicate the problem in FF4b, though, so I'll just use that for now.
cheers and thanks,
David
V odpovědi na David Dailey

Re: setting multiple links in user profile?

autor Rachel Dotey -

I had the same issue

Message: 'length' is null or not an object
Line: 1483
Char: 9
Code: 0
URI: http://parkland.sd63.bc.ca/lib/editor/htmlarea/htmlarea.php?id=10

This seems to be IE8 misbehaving with Java Script - not moodle. I have forum topics about this issue with other CMS systems like Drupal.

THE SOLUTION I FOUND:

I found it here - http://tracker.moodle.org/browse/MDL-19396

Is this:

Edit /lib/editor/htmlarea/htmlarea.php

line 1548 (Moodle 1.9) change the following string

if((HTMLArea.is_ie ? attrname.length > 0 : attrname != null)) {

to

if((HTMLArea.is_ie ? attrname : attrname != null)) {

Works. .length seems to throw an error on a null in ie8.

 

Remember moodle caching is really sticky, refresh the heck out of pages after you update.

 

Spread the love peps - share your solutions.

Thanks,

- Rachel