HTML editor not loading (PHP problem?)

HTML editor not loading (PHP problem?)

by N Hansen -
Number of replies: 6
I've had a nightmare the past few days (and I have other things I am supposed to be doing). I am running Moodle 1.6. My host upgraded php from 5.1.2 to 5.2.3. On 5.1.2 everything worked fine. Because of a known bug that has been mentioned here in the forums, forum posting stopped working in 5.2.3. This I could fix with an upgrade to Moodle 1.6.5 but I didn't have time to do an upgrade, so I asked to be moved to another machine. I was moved to a machine running 5.1.6. Now, the html editor is not loading at all. I had some customizations to my editor but I removed those to isolate the problem but even with the standard editor it is not working.

So my host made some changes, and got TinyMCE working, but I want the standard editor.

I've seen the posts about the intermittent html editor problems some people have been having but I don't think that is the case.
Average of ratings: -
In reply to N Hansen

Re: HTML editor not loading (PHP problem?)

by Mauno Korpelainen -

You seem to have so many problems with all editors that I would take a backup of all customized files and replace ALL files of moodle with new moodle 1.6.5+ package. Visit http://yoursite/admin/ and moodle should be ok again. Check also settings from

Administration -> Appearance -> HTML Editor -> Use HTML Editor

and from user profile:
When editing text: Use HTML editor

If everything works again as normal try to move customized files back later.

In reply to N Hansen

Re: HTML editor not loading (PHP problem?)

by N Hansen -
The problems followed me to 1.6.5 and back to the original server. I have been poking around and came across this tool. Running it on the listed files, the only problem I find is the following. Does anyone understand what this means?:

Checking url: http://www.glyphdoctors.com/lib/weblib.php

501 extraneous characters emitted by your config.php file
The hex encodings of these extraneous characters are shown below
0x03c 0x062 0x072 0x020 0x02f 0x03e 0x0a 0x03c 0x062 0x03e 0x057 0x061 0x072 0x06e 0x069 0x06e 0x067 0x03c 0x02f 0x062 0x03e 0x03a 0x020 0x020 0x072 0x065 0x071 0x075 0x069 0x072 0x065 0x05f 0x06f 0x06e 0x063 0x065 0x028 0x02f 0x066 0x069 0x06c 0x074 0x065 0x072 0x06c 0x069 0x062 0x02e 0x070 0x068 0x070 0x029 0x020 0x05b 0x03c 0x061 0x020 0x068 0x072 0x065 0x066 0x03d 0x027 0x066 0x075 0x06e 0x063 0x074 0x069 0x06f 0x06e 0x02e 0x072 0x065 0x071 0x075 0x069 0x072 0x065 0x02d 0x06f 0x06e 0x063 0x065 0x027 0x03e 0x066 0x075 0x06e 0x063 0x074 0x069 0x06f 0x06e 0x02e 0x072 0x065 0x071 0x075 0x069 0x072 0x065 0x02d 0x06f 0x06e 0x063 0x065 0x03c 0x02f 0x061 0x03e 0x05d 0x03a 0x020 0x066 0x061 0x069 0x06c 0x065 0x064 0x020 0x074 0x06f 0x020 0x06f 0x070 0x065 0x06e 0x020 0x073 0x074 0x072 0x065 0x061 0x06d 0x03a 0x020 0x04e 0x06f 0x020 0x073 0x075 0x063 0x068 0x020 0x066 0x069 0x06c 0x065 0x020 0x06f 0x072 0x020 0x064 0x069 0x072 0x065 0x063 0x074 0x06f 0x072 0x079 0x020 0x069 0x06e 0x020 0x03c 0x062 0x03e 0x02f 0x068 0x06f 0x06d 0x065 0x02f 0x070 0x069 0x07a 0x07a 0x061 0x070 0x032 0x032 0x02f 0x070 0x075 0x062 0x06c 0x069 0x063 0x05f 0x068 0x074 0x06d 0x06c 0x02f 0x06c 0x069 0x062 0x02f 0x077 0x065 0x062 0x06c 0x069 0x062 0x02e 0x070 0x068 0x070 0x03c 0x02f 0x062 0x03e 0x020 0x06f 0x06e 0x020 0x06c 0x069 0x06e 0x065 0x020 0x03c 0x062 0x03e 0x034 0x032 0x03c 0x02f 0x062 0x03e 0x03c 0x062 0x072 0x020 0x02f 0x03e 0x0a 0x03c 0x062 0x072 0x020 0x02f 0x03e 0x0a 0x03c 0x062 0x03e 0x046 0x061 0x074 0x061 0x06c 0x020 0x065 0x072 0x072 0x06f 0x072 0x03c 0x02f 0x062 0x03e 0x03a 0x020 0x020 0x072 0x065 0x071 0x075 0x069 0x072 0x065 0x05f 0x06f 0x06e 0x063 0x065 0x028 0x029 0x020 0x05b 0x03c 0x061 0x020 0x068 0x072 0x065 0x066 0x03d 0x027 0x066 0x075 0x06e 0x063 0x074 0x069 0x06f 0x06e 0x02e 0x072 0x065 0x071 0x075 0x069 0x072 0x065 0x027 0x03e 0x066 0x075 0x06e 0x063 0x074 0x069 0x06f 0x06e 0x02e 0x072 0x065 0x071 0x075 0x069 0x072 0x065 0x03c 0x02f 0x061 0x03e 0x05d 0x03a 0x020 0x046 0x061 0x069 0x06c 0x065 0x064 0x020 0x06f 0x070 0x065 0x06e 0x069 0x06e 0x067 0x020 0x072 0x065 0x071 0x075 0x069 0x072 0x065 0x064 0x020 0x027 0x02f 0x066 0x069 0x06c 0x074 0x065 0x072 0x06c 0x069 0x062 0x02e 0x070 0x068 0x070 0x027 0x020 0x028 0x069 0x06e 0x063 0x06c 0x075 0x064 0x065 0x05f 0x070 0x061 0x074 0x068 0x03d 0x027 0x02e 0x03a 0x02f 0x075 0x073 0x072 0x02f 0x06c 0x069 0x062 0x02f 0x070 0x068 0x070 0x03a 0x02f 0x075 0x073 0x072 0x02f 0x06c 0x06f 0x063 0x061 0x06c 0x02f 0x06c 0x069 0x062 0x02f 0x070 0x068 0x070 0x027 0x029 0x020 0x069 0x06e 0x020 0x03c 0x062 0x03e 0x02f 0x068 0x06f 0x06d 0x065 0x02f 0x070 0x069 0x07a 0x07a 0x061 0x070 0x032 0x032 0x02f 0x070 0x075 0x062 0x06c 0x069 0x063 0x05f 0x068 0x074 0x06d 0x06c 0x02f 0x06c 0x069 0x062 0x02f 0x077 0x065 0x062 0x06c 0x069 0x062 0x02e 0x070 0x068 0x070 0x03c 0x02f 0x062 0x03e 0x020 0x06f 0x06e 0x020 0x06c 0x069 0x06e 0x065 0x020 0x03c 0x062 0x03e 0x034 0x032 0x03c 0x02f 0x062 0x03e 0x03c 0x062 0x072 0x020 0x02f 0x03e 0x0a

And here is the raw unencoded output generated by your config.php
<br /> <b>Warning</b>: require_once(/filterlib.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in <b>/home/mydirectory/public_html/lib/weblib.php</b> on line <b>42</b><br /> <br /> <b>Fatal error</b>: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/filterlib.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/mydirectory/public_html/lib/weblib.php</b> on line <b>42</b><br />


I should add that running debugging shows no errors on the page where the editor is supposed to load.Here is the html for where the editor is supposed to load:

<script type="text/javascript" src="http://www.glyphdoctors.com/lib/editor/htmlarea/htmlarea.php?id=8"></script>
<script type="text/javascript" src="http://www.glyphdoctors.com/lib/editor/htmlarea/lang/en.php"></script>
<textarea id="edit-message" name="message" rows="25" cols="65"></textarea>

In reply to N Hansen

Re: HTML editor not loading (PHP problem?)

by N Hansen -
I just wanted to add that something that jumps out at me in this is the fact that it inserts the course number (?id=8) at the end of the htmlarea.php url. I don't see this with the other editors, nor do I see this in the code for the pages here at moodle.org where the editor is working. Is there any significance in that?
In reply to N Hansen

Re: HTML editor not loading (PHP problem?)

by Jan Dierckx -

It inserts the course number to give teachers and admins access to the files area for that specific course. That way you can use the htmlarea editor to select images you uploaded, etc... (and I may be wrong but I think that's why you don't see it logged in as a student on moodle.org)

Can't help you with your html editor problem, but I have similar problems with the html editor loading only half the time. Sofar none of the solutions have helped.

In reply to N Hansen

Re: HTML editor not loading (PHP problem?)

by Mauno Korpelainen -
It simply means that file lib/filterlib.php is not found (it may be missing or not found from the place where it should be). At the beginning of weblib.php
require_once("$CFG->libdir/filterlib.php"); is serching filterlib.php.
In reply to Mauno Korpelainen

Re: HTML editor not loading (PHP problem?)

by N Hansen -
It is there though-that's the odd thing.