IE7 JS errors with editor

Re: IE7 JS errors with editor

by Rachel Dotey -
Number of replies: 0

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