YUI combo not found

YUI combo not found

by edu g -
Number of replies: 2

Hi,

I created a YUI extension in my theme. It works in localhost but when I deployed in my pre-production server, Moodle can't found the file.

My extension has name:

YUI.add('moodle-theme_planet-togglelistbox', function(Y) [...]

I explored the html generated in my pages to include the javascript of this module. The URL it generates is

http://example.org/moodle/theme/yui_combo.php?moodle/312/theme_planet/yui/togglelistbox/togglelistbox.js

and it says that my class is undefined. I opened the url in the browser and I got the contents of the file that are sent to my templates:

// Combo resource moodle/312/theme_planet/yui/togglelistbox/togglelistbox.js not found!

clearly my class is undefined. instead of my code there is an error message sad

this URL, in my localhost environment, has 308 instead of 312. I don't know how this number is generated.

My file has the correct permissions and owner in the server (LAMP). my dev environment, however, is windows. I thought about common problems like permissions, encoding, not uploading the correct files, etc.

I've been reading through and I saw that yui_combo has had problems in the past. I couldn't figure out what is wrong with my installation. I also tried using on-line YUI libraries.

any hints?

 

Average of ratings: -
In reply to edu g

Re: YUI combo not found

by edu g -

solved.

the name of the directory was toggleListBox and it had to be all lowercase, as written in the code. parts of the name of the module are used as namespace.

In reply to edu g

Re: YUI combo not found

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Edu G,

That sound about right. Although Windows itself doesn't give two hoots about casing of files (and Mac doesn't either with most configurations), most software is a lot fussier.

Good luck,

Andrew