YUI libraries not loading

YUI libraries not loading

by Travis Wilhelm -
Number of replies: 8

We've just done an upgrade from moodle 2.2 to 2.4.1 (on an xampp, PHP 5.3.5, mysql 5.5.8, Windows Server 2008 R2 environment). I had to turn off the slasharguments setting to get it working after the upgrade.

The YUI seems to not be loading. I am doing most of my testing in Chrome, but have also tried via firefox and IE.  By default, the error console says: 

Uncaught ReferenceError: YUI is not defined view.php:489

So I have tested by enabling online YUI libraries (not ideal, because I want to use https if possible in the near future) and now I get a slightly different error in areas where the filepicker is used (such as submitting an assignment or uploading a file):

Uncaught TypeError: Cannot read property 'widget' of undefined javascript.php:1

(and the file picker doesn't load, it just sits with the loading circle). Strangley, in this configuration of using online YUI libraries, the file picker loads in IE9, but doesn't support drop and drag.

I would like to get the local YUI libraries to work. Can someone suggest a further way of debugging what the problem might be? Thanks in anticipation!

Average of ratings: -
In reply to Travis Wilhelm

Re: YUI libraries not loading

by Ken Task -
Picture of Particularly helpful Moodlers

2.4.1 now introduces cache in Moodle.  Check Site Admin menu for a tool to purge all caches.  Also, search for YUI from admin search.  Thought there was a setting to use local YUI files or from network.

Install FireBug for FireFox and run it while viewing the site.  Might provide more information.

'spirit of sharing', Ken

In reply to Ken Task

Re: YUI libraries not loading

by Travis Wilhelm -

Thanks Ken,

Yes, I've tried purging all caches.

I've also outlined the difference between using local YUI and internet based ones - I really want to get local YUI files to work.

Thanks anyway.

In reply to Travis Wilhelm

Re: YUI libraries not loading

by Travis Wilhelm -

Am I correct in assuming that IE9 works because it detects it as an 'old' browser and loads the 'old' file picker that doesn't support drop and drag?  Therefore I am only having problems with the 'new' file picker not loading....

Maybe this bit of information helps...

In reply to Travis Wilhelm

YUI libraries not loading when external

by Travis Wilhelm -

OK, a bit more testing and it seems that the local YUI libraries are working when accessed on the intranet (ie. when I am at the school) but not from home.  This suggests that it is a possible firewall issue, but can anyone suggest what to look for with this? Thanks

In reply to Travis Wilhelm

Re: YUI libraries not loading when external

by Ken Task -
Picture of Particularly helpful Moodlers

Think one would have to disclose firewall vendor for anyone to begin to make suggestions there.  More than likely, if you are sure it's not a Moodle caching issue, someone will have to contact the firewall support/provider.

But, It might not be just the school firewall ... that's the end point from your connection to Moodle outside of school.  Example: have a home connection that uses OpenDNS added to their 'firewall' for home customers.  Sometimes (seldom, I might add) OpenDNS has determined (somehow) that a school site is suspect and I cannot hit the school site.

There could also be issues with network ... network has to work before application.  Suggest doing a traceroute from your home location to the school moodle.  That may not complete all the way to the moodle server, but you might discover there is an issue with routing (which you cannot control).  If that is the case, carriers have to get involved.

And there is a situation like this ... had a Moodle Linux server running iptables (server firewall).  Similar issues with teachers/students attempting to access the Moodle from the outside turned out to be in-compatibility with the schools firewall and iptables.  If we turned off iptables on the server, no problems.  We did that until the school replaced their firewall with a better product ... which was also compat with Moodle servers iptables.

'spirit of sharing', Ken

 

In reply to Ken Task

Re: YUI libraries not loading when external

by Greg Relaford -

Another gotcha to look out for, which you somewhat discovered here.  The YUI2 in pre-2.3.x Moodle worked in various browsers.  YUI3 conflicts with the interpretation of mouse vs touch vs tablet vs 'smart board' inputs.  Newest IE on Windows, Safari, latest Chromium, seem to work, FF and Chrome fail.  AJAX on Moodle stops working correctly.  

Trouble tickets have been posted in several places, including with the YUI development team.

Average of ratings: Useful (1)
In reply to Greg Relaford

Re: YUI libraries not loading when external

by Travis Wilhelm -

Thanks for the hints and suggestions.

It seems to be only on a couple of particular computer / browser combinations and not consistent. For example, at the moment on my home computer I need to use IE9 rather than Chrome. Not a big issue - but also not helpful if others in future have the same problem.

Thanks again! I really appreciate the community on here!