dmuneras / moodle-theme_archaius

Moodle theme
5 stars 9 forks source link

JavaScript Issues in Firefox #20

Closed Panman82 closed 10 years ago

Panman82 commented 10 years ago

We are getting errors in Firefox (across platforms) that jQuery and ArchaiusJSEffects are not defined. Everything works fine in Chrome so I'm unsure what would be different between the two. Due to the error, the page does not load properly. I've opened up a demo course to Guest access so everyone can see what's going on.

http://learn.district196.org/course/view.php?id=582

image

dmuneras commented 10 years ago

Hi,

I took a look on my test website and everything works, but yes, I get the error when I visit yours.

Could you tell me which version of Moodle are you using?

Have you modified the theme? because I took a look at the source code of your website seems a little bit different.

captura de pantalla 2014-09-02 a la s 11 40 07

captura de pantalla 2014-09-02 a la s 11 39 16

dmuneras commented 10 years ago

Take a look of this. ;)

captura de pantalla 2014-09-02 a la s 12 07 25

captura de pantalla 2014-09-02 a la s 12 07 43

Should be related with this: https://bugzilla.mozilla.org/show_bug.cgi?id=backslash

Panman82 commented 10 years ago

Humm... we are running on IIS (Windows) which might be transposing forward and back slashes. Just updated Moodle again last Friday to the latest version. No modifications to your theme, straight copy/paste. I'll try to dig deeper on the whole slash issue and report back. Thanks!

dmuneras commented 10 years ago

Let me know when you have further information. This is interesting.

Regards, Daniel.

Panman82 commented 10 years ago

At this point I suspect it to be a Moodle bug. I've found that this issue effects several themes which include jQuery files. However, I'm having a tough time figuring out where the URL's are generated.

Update: I think I may have found it.. /lib/outputrequirementslib.php -- get_jquery_headcode()

dmuneras commented 10 years ago

I think this is the file your are looking for: https://github.com/moodle/moodle/blob/master/lib/outputrequirementslib.php

dmuneras commented 10 years ago

screen shot 2014-09-02 at 2 14 52 pm

Panman82 commented 10 years ago

Found it!

moodle/lib/outputrequirementslib.php line 520, in method jquery_plugin()

The $url comes from the $path which is the full path on the hard drive (not URL) which contains OS specific DIRECTORY_SEPARATOR. For now I've put in a simple replace to convert from back to forward slash. Probably is a more "correct" way to fix this.. I'll report this on Moodle Tracker. Thanks

$url = str_replace('\\', '/', $url);

dmuneras commented 10 years ago

GREAT!,

As the comment says: // This is not really good, we need slasharguments for relative links, this means no caching...

I hope it could fix your problem, it is not really a problem of Archaius, so, I will mark this issue as invalid (Invalid in this context, but obviously this is important and would be useful for other people).

I want to ask you for a favor. Could you answer this short questionnaire, it is part of my master degree project, so, I will appreciated if you can answer it: https://docs.google.com/forms/d/1Q_jXA_rPq0nGbHLn8mSsAA37dnD_A254S712reczFm0/viewform

Best regards, Daniel.

Panman82 commented 10 years ago

Yep, understood on the invalid label. Reported to Moodle here: https://tracker.moodle.org/browse/MDL-47073 I'll also try the slasharguments option. Thanks again, will complete your survey in a moment.