Full screen editor problem in some browsers

Full screen editor problem in some browsers

by Sharon Goodson -
Number of replies: 21

Recently migrated and upgraded from 1.9.2 to 1.9.3 and noticed the full screen editor does not display correctly in IE (no surprise) or Maxthon. It does display correctly in Fire Fox.

See attached screen shot. Also, while there is text in the minimized editor, it does not appear in the full screen. Occasionally I still get the overlib 1.4 message (which was common in 1.9.2, but never caused this behavior), and one out of every 20 or so times it will actually display properly (in IE).

I discovered this when installing Dragmath. After uninstalling, however, the problem remains. I guess I haven't used the full screen editor in IE since the move/upgrade.

Any ideas?

Thanks in advance!

Attachment fullscreen.jpg
Average of ratings: -
In reply to Sharon Goodson

Re: Full screen editor problem in some browsers

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
That's interesting because when I use IE7 I don't have problems with the full screen editor (although at my school we still get the overlib4 message despite having upgraded to 1.9.3) I wonder if there is something specific to your own set up that is causing this?
In reply to Mary Cooch

Re: Full screen editor problem in some browsers

by Sharon Goodson -
Hi Mary!

I did find a tracker regarding this: http://tracker.moodle.org/browse/MDL-15626

Oddly, enough, this does NOT occur using IE when I access my test site, which is on a different hosted server. This might indicate it has to do with the setup on the new host, but I don't understand how that could be... mixed


In reply to Sharon Goodson

Re: Full screen editor problem in some browsers

by Mauno Korpelainen -
Andy Tagliani had a similar problem with his https server - http://tracker.moodle.org/browse/MDL-10794
In reply to Mauno Korpelainen

Re: Full screen editor problem in some browsers

by Sharon Goodson -
Thanks for that reference, Mauno. I've actually found a few more similar trackers, but there doesn't seem to be a clearcut cause or solution. I'm at a loss on this one.

Tech support at the MP hosting our site thinks it's one of my plugins or something specific to my site. Part of this is I guess because I installed my own plugins, but I'm also the only site on the server reporting this problem.

However, I have the identical moodle version and setup on a different hosted server (our test site) and the editor opens correctly in IE. We've actually accessed both sites with IE from several different computers, and every time, the test site works and the production site doesn't.

The MP site, of course, has far better hardware, the most recent software updates and moodle-specific configurations. It's running PHP 5.2.2 with Apache 2, were as the test site is running PHP 5.2.1 with CGI.

Regardless, I would think if it was something specific to my site, or my plugins, I would see the same editor behavior from both servers. If it was exclusive to IE, again, it would this would occur with both sites. While the new site solved some major performance issues, created a few new issues (I can't use Activity locking on the new site, for example, but it still works on the test site running the same moodle version).

Unfortunately, I only have ftp access to the new site, so I can't examine server or script error logs or anything else outside of the moodle root folder.

Hopefully, someone will stumble along the post with some ideas, any would be most appreciated. I hate to have to force students to start using a specific browser, especially the ones who have been using IE all along.

Thanks!
In reply to Sharon Goodson

Re: Full screen editor problem in some browsers

by Mauno Korpelainen -
I would start from those files that you edited ( "I discovered this when installing Dragmath. After uninstalling, however, the problem remains." )

Some text editors can add whitespaces (even notepad) and you could upload the original files of folder lib/editor/htmlarea from the original package ( http://download.moodle.org/stable19/ ) or the latest package ( http://download.moodle.org ) over the edited files. Did you edit any lib files like moodlelib.php or weblib.php?

Testing fullscreen.php with IE8 might give the exact error with IE8 debugging mode (if you have some test pc with IE8) but you could test also setting Debugging to ALL from Administration->Server->Debugging...

If fullscreen editor in clean moodle (default settings without any extra plugins and modifications) works ok it is easy to start looking for the cause of your problem - can you (or your MP) test full screen editor from another parallel version on the same server?
In reply to Mauno Korpelainen

Re: Full screen editor problem in some browsers

by Sharon Goodson -
Thanks again Mauno! I made copies of my original dialog.js and htmlearea.php before installing dragmath (since those are the only ones modified - I didn't use the dragmath adminlib.php). I restored the originals when I uninstalled Dragmath.

I honestly think the discovery after Dragmath is a coincidence. The new site hasn't been up but a few weeks, and I don't think I've accessed full screen editor since the move.

The only other file I've modified is moodle/config.php to set default block layout. Any other modules, blocks I've added were only drop-ins. I wouldn't think adding a folder in a completely unrelated area would have a effect, but maybe I should start removing those???

I did do admin>debugging, but nothing showed up. A few minutes ago I just got cPanel access, but I'm not finding anything useful. I'm not sure the error log I have access to shows much more then http errors.

I don't think my MP will invest more time in this, since I'm apparently the only site with this issue and I don't have a service contract. I'd assume this is a software issue, which doesn't require a contract, but who knows.

If it's something in my site configuration or setup, though, I still don't understand why it's not doing it on the mirror site on the old server. The only differences are server configurations and/or software, which I don't have any control over.

I'll try IE8 (I actually started to use the web developer tools in Fire Fox before I realized 'Duh!' The problem doesn't happen in Fire Fox.' Time for a break, no doubt *lol*

Thanks for the tips (and for listening!)
In reply to Sharon Goodson

Re: Full screen editor problem in some browsers

by Mauno Korpelainen -

Thank you for the private message, Sharon.

In this case it turned out to be asciimathml filter that caused the problem - fullscreen.php is like a separate web page that is trying to load same scripts that were present in the opener page but it does not seem to work with all scripts.

I have used asciimathml through (standard or custom) theme and meta.php with tags

<script type="text/javascript" src="<?php echo $CFG->httpswwwroot ?>/lib/editor/common/ASCIIMathML.js"></script>

(the script must be then in folder lib/editor/common)

and a couple of additional settings and adding the same tags to fullscreen.php seems to work ok (I added them after<script type="text/javascript" src="../plugins/TableOperations/lang/en.js" charset="utf-8"></script>)  . It should not be this way - fullscreen.php should use filters and take meta tags from theme like most other pages in moodle but while waiting moodle 2.0 and tinymce this seems to be the easiest way to use fullscreen editor and also asciimathml.

Average of ratings: Useful (1)
In reply to Mauno Korpelainen

Re: Full screen editor problem in some browsers

by Sharon Goodson -
Thanks again Mauno! I'll let you know where all this goes! Moodle 2 can't come soon enough *lol*
In reply to Sharon Goodson

Re: Full screen editor problem in some browsers

by Mauno Korpelainen -

From your post I got a totally new idea to my editor testing. The traditional integration of HTMLArea (or TinyMCE) as a single default editor is rather tough to change but it might also be possible to create a simple editor switcher plugin using the same method as fullscreen.php does - to render tinymce (or some other customized editor) in a popup and let it submit the edited content back to original textarea (or htmlarea).

Editor inside editor as a plugin ... I *must* test this ... Thanks, Sharon and Marc! smile

By the way - IE8 is still beta2 so if you don't need IE developer features uninstalling IE8 (or removing Windows update in Vista) back to IE7 might be reasonable.

In reply to Mauno Korpelainen

Re: Full screen editor problem in some browsers

by Sharon Goodson -
Yeah, IE8 is certainly not ready for prime time. I was silly to think I would still have access to IE7 (I know better), so it's uninstalled. The developer tools can't handle my moodle pages and freeze up. The one thing it did do was allow me to view a full java script error message (with internet options set to show all script errors), where as IE7 cuts the last part of the message off.

asciimath in themes seems to work, but still has the problem with quizzes. I put copies of asciimathml.js and d.svg in the quiz folder (instead of editing quiz/attempt.php, which 'worked' too) as a temporary work around, but I'm watching for issues...

It's interesting that this and activity locking, both highly-used, very common modules (and both expected to be core in Moodle 2) have gone from no issues in 1.9.2 (at least in my case) to having issues in 1.9.3. I wonder if it's just coincidence or if the code change that much from one version to the next.
In reply to Sharon Goodson

Re: Full screen editor problem in some browsers

by Sharon Goodson -
Update: Marc offered to help me on the asciimath/quiz issue, and using mental telepathy or something resolved the issue!

Actually, I think it was a hanging browser issue, and mathplayer wasn't loading properly - don't know what the deal was with FireFox, it was having issues with web tools also - but nonetheless - no files needed in the mod/quiz folder!

(I think I might have beaten Activity Locking, too, btw I've got it running now as well tongueout)

Thanks again for all the help!
In reply to Mauno Korpelainen

Re: Full screen editor problem in some browsers

by Marc Grober -
Thought we had already talked a bit about this Mauno..... when we were talking about how to use eqed.... well, let me know what you come up with......
In reply to Marc Grober

Re: Full screen editor problem in some browsers

by Sharon Goodson -
Hey Marc - you know how you have to put <script type="text/javascript" src="ASCIIMathML.js"></script> in the header of HTML pages (in some cases, probably like when you use is as a filter) - well, now I don't need that, since I'm calling it through meta.php big grin

BUT - since all the assignments I created before using meta.php still include the script, the error messages

"File does not exist: /xxx/public_html/mod/quiz/ASCIIMathML.js, referer: http:/xxx/mod/quiz/attempt.php?id=205"

Are blowing up my error logs (not exactly blowing up, but I don't like them there *lol*).

Can you think of an easy way to get rid of all that, short of editing every question on every assignment? You think running replace.php would work? (I can exclude the common folder from that, can't I?)

Thanks!

In reply to Sharon Goodson

Re: Full screen editor problem in some browsers

by Mauno Korpelainen -

Sharon,

I think the problem is just how you are calling the script. If you use

<script type="text/javascript" src="ASCIIMathML.js"></script> the script is probably read from the folder where reading file is or from web/site root

You could use either full absolute path http://nameofyourserver/yourmoodle/somefolder/ASCIIMathML.js or

<script type="text/javascript" src="<?php echo $CFG->httpswwwroot ?>/folder1/folder2/ASCIIMathML.js"></script> where ASCIIMathML.js should be in folder1/folder2 inside your site

The script can be anywhere - as long as correct path is found...

In reply to Sharon Goodson

Re: Full screen editor problem in some browsers

by Marc Grober -
Well, the first question is whether you indeed handcoded the script markup in every page and how you did that. Are you suggesting that you opened the source editor in each assignment and then inserted the script markup in the html? If yes then that is quite a different issue than Mauno's comment addresses.....

replace.php replaces db instances, not moodledata instances. The /common directory is in /moodle and you should not need to fiddle anything in /moodle. You could hack together a perl routine to churn through /moodledata and delete the code. Depends on where you stuck the script markup.......

If you really have html files being referenced then you can use perl or what have you to iterate through /moodledata for html files, find the expression and delete it as the files will be in moodledata.

Maybe you can offer an example of what you have done?




In reply to Marc Grober

Re: Full screen editor problem in some browsers

by Sharon Goodson -
Thanks Marc and Mauno!

Before I knew anything about Dragmath or anything syntax, I installed asciimathml.js as a filter (per instructions from chapman.edu and where ever else). I actually chose asciimath because our debian server had issues with the default moodle math filters (as I discovered after hours of doc reading and troubleshooting). It was my understanding (and experience) that in order for the script to work, you had to include the line

<script type="text/javascript" src="/msu_jscript/ASCIIMathML.js"></script>

into the top of the html page (using text mode) http://www1.chapman.edu/~jipsen/mathml/asciimath.html.

so, for every assignment, or whatever, I wanted math expressions in, yes, I placed the line of script in the html editor, then proceeded to type my material (using long hand syntax, no less! dead till I discovered Dragmath). In the case of multiple choice questions, I needed to include the script in each of the html blocks for the choices. (In then case of quizzes, as I mentioned before, I had to either place the script file in the mod/quiz folder or edit attempt.quiz to point to it correctly. Both methods worked)

Now, this may have been the long way around (duh), but it worked, and at the time, most references I ran across treated asciimath as a filter and gave instructions for such.

HOWEVER, now that 's in the editor/common folder, and being called by themes meta.php, I know longer need the script line in the html page, and I no longer need the script in the quiz folder (already removed).

I'm not having any problems, all is working properly, it's just that the html page is still looking for the script and inserts several error messages in the log file everytime the page is accessed.

I was just wondering if there was an easier way to remove the code from the html pages (blocks), as I no longer need them. Since files in the common folder (which I DO need) contain the exact same line, obviously, I need to be careful.

I hope that makes sense. Thanks for your input!

In reply to Sharon Goodson

Re: Full screen editor problem in some browsers

by Marc Grober -
Sharon,

I understand what you've done and unfortunately there are no easy answers because a remedy depends on where you stuck the reference. Well, I have suggested a work-around that will resolve your concerns as stated..... It should work fine though its not something I want to be on record suggesting ;=}

The Hard Way

I already provided you info on ways to fix materials that actually appear in /moodledata. db wise, you can dump the db and then do a search and replace and I think that will catch instances in which you actually included it in quiz items (the same utilities will work on the dumped sql file but make sure you make a copy that you have not fiddled just in case. When you are done jettison the tables and import the fixed tables from the sql file. I'd keep the site in maint. mode during the fixing so no one loses any work.....

The Easy Way

I suppose a work-around is to leave everything where it is and to empty the file being referenced by the embedded script reference except for a comment.... which I think would result in the embedded referenced js file getting sourced quickly (nothing to do in the file) first, followed by the source referenced in meta.php..... since this is by far the easiest way to go, I'd test it first........ all you'd need to do is ensure that the file referenced exists and put a comment in it that the file has been replaced, the usage is obsolete, and one might want to look in meta.php.......


Average of ratings: Useful (1)
In reply to Marc Grober

Re: Full screen editor problem in some browsers

by Sharon Goodson -
hmmm...I'll take door number two.

I removed the .js file (and folder) from the filters directory when I set it up they way you and Mauno suggest, so it does not exist (thus the bloated error logs), nor does it need to.

But what you're saying is to restore the file, but comment it out, correct? This way pages aren't looking for something that's not there, thereby eliminating error messages.

Do I get it? *lol*

PS _ thanks for the links, btw - I'm checking those out now
In reply to Sharon Goodson

Re: Full screen editor problem in some browsers

by Marc Grober -
You don't need the entire asciimathml.js file nor all the files in the directory..... you just need the minimum so that the the file you reference in your html is found.... then in that file you should just need a one line comment. This will allow the file to get quickly loaded and not do anything..... and since I believe it will be sourced first, the second invocation from meta.php will still work..... or at least that's the idea and it should easy enough to test.....
In reply to Marc Grober

Re: Full screen editor problem in some browsers

by Sharon Goodson -
Looks like that works! Thanks a bunch! It will be nice to get onto other things if I can every get all these weird quirks  dealt with *lol*