HTMLarea is undefined?

HTMLarea is undefined?

by rich t -
Number of replies: 38

Hi,

We seem to be having errors with the editor. Every now and then, we receive "HTMLarea is undefined." The toolbars do not appear. However, if we do a refresh, then everything is fine. Using IE 6.00.28 and the latest nightly download of 1.2.

Thanks for any ideas.

Rich

Attachment error.gif
Average of ratings: -
In reply to rich t

Re: HTMLarea is undefined?

by Janne Mikkonen -
Well this is a known bug, but unfortunately only known fix for it is "Refresh". It seems to happen occasionaly on IE but fairly rarely (I hope).

Could you tell does it do this after you've refreshed eg. when you leave the site and come back?

In reply to Janne Mikkonen

Re: HTMLarea is undefined?

by rich t -

Hi Janne,

It seems to be ok after refreshing, or after returning to the site.
I seem to be having similiar issues as Thierry in http://moodle.org/mod/forum/discuss.php?d=6042 (no toolbars-but that goes hand-in-hand with the error message).

I did not experience any of these issues until the last week, after upgrading the 1.2 Development to the 1.2 beta. 

Thanks.

Rich

In reply to rich t

Re: HTMLarea is undefined?

by Rob LeVine -

This is happening to me... with IE 6.00.28 and todays download of the latest nightly download.  On the moodle.org site, the editor works... but on mine, it is broken.

Refreshing (multiple times) does not help, and the editor is enabled in both places.

During the install - I received one error :

Notice: Undefined property: debug in /home/rlevine/public_html/moodle/lib/datalib.php on line 569

but I after looking in the forum, I don't think it is releated (but since it is abnormal for me to ever get an error during a fresh install of moodle, I thought I would mention it.)

I'll nuke this nightly CVS install, and install the offical beta of 1.2, and see if it appears there.

Rob

In reply to Rob LeVine

Re: HTMLarea is undefined?

by Rob LeVine -

Ok - to follow up - I went back to the "offical" 1.2 beta - and the html editor still does not work (htmlarea problem).

So for me, the editor is still broken.

But the

Notice: Undefined property: debug in /home/rlevine/public_html/moodle/lib/datalib.php on line 569

went away... so that seems to be a cvs nightly problem.

Snidley

In reply to Rob LeVine

Re: HTMLarea is undefined?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You have some blank lines in your config.php, towards the end.  These headers are causing other things not to load properly.
In reply to Martin Dougiamas

Re: HTMLarea is undefined?

by Rob LeVine -

Right.  I did have blank lines, and when I removed them, it worked.

I should know better.... it is just that the blank lines usually cause other problems with the install and stuff... so when all looked ok, I did not even think to look there.

Sorry for the trouble!  blush

In reply to Rob LeVine

Re: HTMLarea is undefined?

by thierry reygnier -

Hello,

For me i still have the same problem and the editor is still unvailable for me... I check my config.php but nothing at the end of the file.

I still receive "HTML.area" not defined...

I don't know what to do...

Maybe if i update on the final release of 1.2....

Bye...

http://e-stjo.edres74.net

In reply to thierry reygnier

Re: HTMLarea is undefined?

by Janne Mikkonen -
This could be far fetch but, if your language settings are french, could you try it on another language like english? What happens then?
In reply to Janne Mikkonen

Re: HTMLarea is undefined?

by thierry reygnier -

Hello,

Even in english language i obtain an HTMLarea not define...

I'm still looking for...

Thank you...

In reply to thierry reygnier

Re: HTMLarea is undefined?

by rich t -

Hi Thierry,

We are still experiencing the 'HTMLarea' undefined as well.

By chance, are you receiving this error on workstations that have internet filtering installed?

Thanks.

Rich

In reply to rich t

Found the problem...

by thierry reygnier -

Hello,

I found the problem for my "HTMLarea not defined" error message.

There was a ".htaccess" file in "/lib/editor" that didn't allow system to access files...

Does this file useful ? because i renamed it and all is working good...

Bye...

In reply to thierry reygnier

Re: Found the problem...

by Andy Diament -
I tried applying this one; unfortunately my server is windows (same problem with editor in ie6 using win xp pro or win 2k server) and I haven't actually got an file called .htaccess, hidden or not.

However, in .../moodle/lib, there is a file called htaccess, which it suggests that you copy to .../moodle and rename .htaccess.

 Of course, windows won't allow a file called .htacess, but if you move it to .../moodle and leave it called htaccess, then the problem with ie 6 goes away - everytime you launch a moodle page with the htmlarea editor, it now works, without having to leave moodle and start again.smile

Can someone else confirm that this works on a windows server

Andy D
In reply to Andy Diament

Re: Found the problem...

by Janne Mikkonen -
In reply to Janne Mikkonen

Re: Found the problem...

by Andy Diament -

Now I am really confused, having looked at this

On my laptop/experimenal setup (Win xp apache 2.0.48 moodle 1.2 beta) I copied the .htaccess file to moodle/htaccess and the html area problem disappeared when accessing from IE6; however, apache should have ignored the htaccess file as it is configured to look for .htaccess

On our main server (win 2k server, apache 2.0.47 moodle 1.2 beta) I did the same, and I thought it worked but it makes no difference to htmlarea in ie6. I then configured apache to look for htaccess instead of .htaccess, it did not cure the problem, but gave a noticable performance hit (as the apache documentation implies)

So, is this the cure or a red herring?mixed

Cheers, Andy D

[ps, has anyone got a smiley that conveys thoroughly bewildered and fed up]

In reply to Andy Diament

Re: Found the problem...

by rich t -

Hi Andy,

Are you running IIS, or Apache on the Windows server?

Thanks.

Rich

In reply to rich t

Re: Found the problem...

by Andy Diament -

apache 2.0. on both of my set ups - I think the htaccess file is apache specific

Cheers, Andy D

In reply to Andy Diament

Re: Found the problem...

by rich t -

Hi Andy,

Just wanted to make sure. I am using IIS. We are still seeing the problem(HTMLarea undefined) since installing the latest nightly 1.2. As I mentioned earlier--we did not have them with the beta, or 1.1.

Still searching for a solution....

Thanks.
Rich

In reply to rich t

Re: Found the problem...

by Janne Mikkonen -
Is this happening on several workstations?
In reply to Janne Mikkonen

Re: Found the problem...

by Andy Diament -

The problem is seen using networked workstations (ie6 win 2k pro) connecting to our moodle server (win2k server) it is also seen using ie5 on the server itself through a terminal client; the server also runs IIS for asp apps, this has never interfered with the apache

the problem is not seen using the same workstations to work on moodle.org pages (e.g. this forum reply)

the problem is not seen using  my laptop (win xp pro, ie6) connecting to our local server, localhost or moodle.org (although it was not seen with localhost until I copied .htaccess into .../moodle)

and of course, never a problem with mozilla or firefox!

Thanks to all for help so far

Andy D

In reply to Janne Mikkonen

Re: Found the problem...

by rich t -

Hi Janne,

It is happening on most, if not all, of our workstations (WinXP).
I am experimenting further to see if it has anything to do with our internet filtering (Cybersitter). It is difficult since it seems that other sites with javascript, work fine.

The curious thing is that this started happening after upgrading to 1.2beta, vs. 1.2 dev.

But, I am going to open all doors to find the answer.

Thanks.

Rich

In reply to thierry reygnier

Re: Found the problem...

by thierry reygnier -
I did an error in my message the ".htaccess" was in "..\lib\" and not in "..\lib\editor"

Bye


In reply to rich t

Re: HTMLarea is undefined?

by Janne Mikkonen -
Continuing this: http://moodle.org/mod/forum/discuss.php?d=6033#29019

This is weird since differences between 1.2dev and 1.2beta are not that big. The only changes are made to popup dialogs. So I'm confused.
In reply to Janne Mikkonen

Re: HTMLarea is undefined?

by Kevin Lawry -
I think that the problem is with HTMLArea rather than moodle, I have been playing with this all day. I have replaced the version of HTMLArea with the latest from their web site (although not from the cvs tree) and have the same problem. I try opening their example and I have the same problem Firefox works IE on my 2003 server works IE on my W2K workstations fails There is more than one error, the HTMLArea is undefined is the last one. The first reports an error on line 508 'Unexpected Quantifier' now the example page is nowhere near that long, so I am assuming that the line number refers to the HTMLArea code - however line 508 is a comment so I am not sure where the numbering start sad I think that for some reason the applet fails to initialise the object because it fails at this point, and that gives the 'undefined' errors that follow. A friend of mine has rumured that IE6 on W2K SP4 gives incorrect results from regular expressions in javascript - and there are a shed load of them in HTMLAreas code. If anyone can spread any more light I would be most grateful - I have just upgraded to the newer Moodle, and have to explain why the wysiwig editor has died in the process.
In reply to Kevin Lawry

Re: HTMLarea is undefined?

by Janne Mikkonen -
Could you give this a try and tell if there are any success? http://support.microsoft.com/default.aspx?kbid=308260 


In reply to Janne Mikkonen

Re: HTMLarea is undefined?

by Kevin Lawry -

Updating the scripting engine cured the problem, I can now edit using htmlArea.

Unfortunatly it screws up some of my existing resources because they had some vbcode & forms in them (clicking the form button launced a programe).

For now I shall have to learn not to edit those resources in HA3

Thanks for the pointer - now I just have to roll out the upgrade to 300 machines sad

In reply to Janne Mikkonen

Re: HTMLarea is undefined?

by Andy Diament -
Tried this - on 1st attempt does not work, but waiting for an adminsitrator to try it on a system workstation

further detective work:
1) Each time the editor fails in this way, the ie6 debugger traps 3 errors:

the 1st in ....moodle/lib/editor/lang/en.php
expecting a '}'in the section beginning HTMLArea.I18N = {....
(though I can't see any unbalanced {} pairs)

but it ignores this, falling over at he HTMLArea undefined stage, part of HTMLArea.ReplaceAll in htmlarea.php

does that help towards a solution?

Andy D
In reply to Andy Diament

Re: HTMLarea is undefined?

by Janne Mikkonen -

Could you check what Firefox's JavaScript console says about this? Is there any error messages and most of all does those errors include any "odd" charachters?

In reply to Janne Mikkonen

Re: HTMLarea is undefined?

by Andy Diament -

Hiya

Already tried that one - there are no error messages on the firefox or mozilla consoles simply because this bug never appears with firefox/mozilla

As far as I can tell it is a microsoft bug, unable to deal with acceptable javascript!

I've literally just come from a meeting with our sytem manager and we are going to try the upgrade to MS scripting engine 5.6, but sadly not yet

Thanks

Andy D

In reply to Andy Diament

Re: HTMLarea is undefined?

by Andy Diament -

Further to this problem, find attached the javascript [from ms script debugger] which causes the 1st error - this is actually what is outut from moodle/lib/editor/lang/en.php and produces an error 'expecting }' - can anyone see a missing } - I think this error leads to the 'htmlarea undefined' error and this is the real culprit

Note that the error is the whole statement and does nto say where the } is missing

And I throw in this comment - this problem NEVER occurs when I use IE6 add replies to moodle.org [like this one], so there may be some server side element to the problem

Andy D

In reply to Andy Diament

Re: HTMLarea is undefined?

by Andy Diament -

Just to return to this one, for interest

We've installed moodle 1.3 on the win server causing the problem, but are now moving it all to a redhat linux server.

The problem remains when used with ie6 and the win server

The problem VANISHES smile with the version mounted on the linux box: the htmlarea box appears properly in ie6 from the win2k workstations

As I have suggested in the past, whatever the cause of  this problem, it is not entirely clientside, but the best advice would be to reduce the MS in your life.....

Thanks to all who have commented on this one in the past

Andy D

In reply to Andy Diament

Re: HTMLarea is undefined?

by Michael Penney -
Thanks for the info. Andy, but we're having the trouble with Moodle 1.2.1 running on a MacOSX server (10.2).
In reply to Michael Penney

Re: HTMLarea is undefined?

by Andy Diament -

Sorry, I can't offer much but the idea that I think it is a combination of web-server and browser;

if it is ie6, try to make sure that patches are as up to date as possible, as that seemed to cure it on 1 machine, but we've not been able to roll it out over the network.

Cheers, Andy D

In reply to Andy Diament

Re: HTMLarea is undefined?

by Janne Mikkonen -
Just out of curiousity, were you using php as cgi or as module on the windows server?
In reply to Janne Mikkonen

Re: HTMLarea is undefined?

by Andy Diament -

Janne,

Interesting point - cgi

It WAS using the module version, then I had some problem last January and I couldn't get apache restarted; using cgi was a work around that worked. I think I was having problems with the gd library and zipping....

I did try to restart it again with the module version, just now, to test this as a hypothesis, but it wouldn't - I'll return to it later if I have time

Cheers, Andy D

In reply to Andy Diament

Re: HTMLarea is undefined?

by Janne Mikkonen -
If you try php as a module make sure that the php4ts.dll is found from your server path (eg c:\windows, c:\windows\system32.)


In reply to Janne Mikkonen

Re: HTMLarea is undefined?

by Andy Diament -
Janne, thanks for the tip - I thought I had done that! I put php4ts.dll in both c:\winnt and c:\wintnt\system32 and restarted apache with the module and apache works.

However,sadly, did not prevent the htmlarea problem on a typical affected machine.

Thanks for help, anyway. Andy D


In reply to Andy Diament

Re: HTMLarea is undefined?

by R Holden -
I am experiencing this same problem (no HTMLarea showing, getting error codes, attached to this post).  My server is windows 2k3 with IIS 6.x, php 4.3.10, Moodle 1.4.3+ (downloaded 1-26-05). 
Attachment moodle_editor_error_2.jpg