[Mediawiki-l] Trying to use ResourceLoader...

Brion Vibber brion at pobox.com
Wed Jul 20 17:41:35 UTC 2011

On Wed, Jul 20, 2011 at 9:36 AM, Daniel Barrett <danb at vistaprint.com> wrote:

> I am trying to port my extension to use ResourceLoader and I can't seem to
> make it work. In my .php file I have:

> so I would think my resource being loaded. But none of the JavaScript & CSS
> are taking effect on the page. Am I doing something obviously wrong?

Nothing screams out at me obviously (other than the spelling err which you
say is a cut-n-paste err in the mail), so a few things to check:

1) Try loading in ?debug=true mode. This will load .js files (and maybe .css
in later versions?) as their own files which can be easier to find in your
browser's debugging tools.

2) Make friends with your browser's debugging tools!

Firefox: http://getfirebug.com/
Chrome: http://code.google.com/chrome/devtools/
IE: http://msdn.microsoft.com/en-us/library/gg589512%28v=vs.85%29.aspx
Opera: http://www.opera.com/dragonfly/

Check the error consoles for error output. Check the network & scripts
panels to ensure that your files get loaded successfully. Check the actual
ResourceLoader output to see if there's anything clear in there. Is your
code getting loaded, but then failing due to a runtime or parse error? Is it
not getting loaded at all because a path is wrong?

-- brion

More information about the MediaWiki-l mailing list