A 'script' named 'jQuery_Tools' could not be found.

Topics: Troubleshooting
Aug 9, 2012 at 8:50 PM
Edited Aug 9, 2012 at 8:56 PM

I have this code on the Layout.cshtml

 

Script.Require("jQuery_Tools").AtHead();

and on the scripts folder it's called

jQuery.Tools.js

I get this error

A 'script' named 'jQuery_Tools' could not be found.

so I go into debug mode and put a breakpoint to see where is it trying to locate it and the BasePath property points to "~/Themes/NVDProd/scripts/" and the Name Property says "jQuery_Tools"

I've tried this:

Script.Require("jQuery.Tools").AtHead(); - Error

Script.Require("jQuery_Tools.js").AtHead(); - Error

Script.Require("jQuery.Tools.js").AtHead(); - Error

This worked on Orchard 1.3 and since I moved it to Orchard 1.5.1 I'm getting this error

 

At this point I am stumped, any ideas on how I can fix this?

Developer
Aug 9, 2012 at 9:50 PM

There's no jQuery_Tools resource defined in Orchard.jQuery, so it must have been defined in another module or theme. I don't know if the name changed since 1.3, but if you still have 1.3 on your machine, you could verify this by having a look at ResourceManifest.cs of Orchard.jQuery. Perhaps the name is changed from jQuery_Tools to jQueryUtils. Also check if this jQuery_Tools resource is part of another module or theme that you've used in 1.3.

Aug 9, 2012 at 10:54 PM

I checked the manifest and there is no mention of such file in 1.5.1 but there was a reference to it in 1.3 so I commented it out and it works now.

 

Thanks for the help.

Coordinator
Aug 10, 2012 at 6:36 PM

Try with Script.Include instead of Require.