2.4 YUI Paginator not loaded?

2.4 YUI Paginator not loaded?

by Kevin Burton -
Number of replies: 6

I have been working with 2.6.2 and incorporated the YUI Paginator and it works pretty well. But when I use Moodle 2.4 I see messages like: yui: NOT loaded: paginator yui: NOT loaded paginagor-core. And finally I get an exception

Uncaught TypeError: Cannot read property 'Core' of undefinded.

This seems be be thrown because of a reference to Y.Paginator.Core. 

Any idea why 2.4 will not load the YUI paginator? Any workarounds?

 

Average of ratings: -
In reply to Kevin Burton

Re: 2.4 YUI Paginator not loaded?

by Darko Miletić -
Picture of Core developers Picture of Plugin developers

Version of YUI included with Moodle 2.4 does not contain Paginator. The only available workaround is to force moodle to use latest YUI librares from official site. To do that open your site's config.php file and add these two lines:

 
$CFG->useexternalyui = true;
$CFG->yui3version = '3.15.0'; // Add whatever version you want to use here. 

And hope that nothing breaks.

In reply to Darko Miletić

Re: 2.4 YUI Paginator not loaded?

by Kevin Burton -

This did not seem to work. Is there another step to be taken?

In reply to Kevin Burton

Re: 2.4 YUI Paginator not loaded?

by Darko Miletić -
Picture of Core developers Picture of Plugin developers

Did you purge your Moodle and browser cache before trying?

In reply to Darko Miletić

Re: 2.4 YUI Paginator not loaded?

by Darko Miletić -
Picture of Core developers Picture of Plugin developers

Also make sure to put yui version configuration setting after the include of setup.php, if not Moodle will just load the same version of YUI library from Yahoo site.

 

 
// config.php
$CFG->useexternalyui = true;
require_once(dirname(__FILE__) . '/lib/setup.php');
$CFG->yui3version = '3.15.0';

 Purge Moodle cache, empty your browser cache and you should be good to go.

 

In reply to Darko Miletić

Re: 2.4 YUI Paginator not loaded?

by Kevin Burton -

Thank you. Now I see an effect but I don't think this will be a solution, as now I am getting numerous exceptions that indicate the hope that nothing would break was in vain.