Call to absent js script

AcuraImport - September 15, 2009 - 20:15
Project:jQuery UI
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I am not sure were the call is coming from but, I am seeing the following script being called in the $scripts var:

<script src="/sites/all/modules/jquery_ui/jquery.ui/ui/minified/ui.mouse.min.js?e" type="text/javascript">

Correct me if I am wrong but this isn’t a jqueryUI script. And as you would expect, the JS Aggregator kicks back a file_get_contents(…) failed to open stream error when enabled. Am I using the wrong jQuery UI library?

Anyone who is more knowledgeable, please chime in.

#1

mkalbere - September 15, 2009 - 20:25

Have a look on the readme (http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/jquery_ui/R...)

Did you :

-- REQUIREMENTS --

* The jQuery UI library.

-- INSTALLATION --

* Copy the jquery_ui module directory to your sites/all/modules directory.

* Download the latest jQuery UI 1.6 release from:

http://code.google.com/p/jquery-ui/downloads/list?can=3&q=1.6

* Extract it as a sub-directory called 'jquery.ui' in the jquery_ui folder:

/sites/all/modules/jquery_ui/jquery.ui/

so the actual jQuery UI JavaScript files are located in:

/sites/all/modules/jquery_ui/jquery.ui/ui/*.js

* Enable the module at Administer >> Site building >> Modules.

#2

mishac - September 16, 2009 - 21:41

I have the same issue and I have the module installed correctly using the instructions from the readme file. It happened when I upgraded to the latest version of the module.

Any help would be appreciated!

#3

grand_master_v - September 17, 2009 - 17:00

I too have this problem. There is no ui.mouse.min.js file in the recommended 1.6 jquery ui package. No idea where this is getting called from.

#4

mkalbere - September 18, 2009 - 15:49

oups .. I read to quickly the first post sorry.

If I remember well jquery_ui is not supposed to do any thing by it self, but can
- be used by you if you need any jquery_ui fonctionnalities
- used by an other module

.. try to look in your source :

jquery_ui_add("ui.mouse");

or list enables modules and find the one that depend on jquery_ui

#5

mishac - September 21, 2009 - 01:36

Just FYI to anyone else having this issue, it turns out it was the devel module that was calling for ui.mouse. Commenting out those lines fixed the issue.

#6

AcuraImport - September 24, 2009 - 00:45

For the life of me I cannot find it. Could you tell me what file and line?

#7

mattyoung - September 27, 2009 - 05:38

It's the devel_themer.module:

<?php
   
// The order these last two are loaded is important.
   
if (module_exists('jquery_ui'))
    {
     
jquery_ui_add('ui.core');
     
jquery_ui_add('ui.mouse');
     
jquery_ui_add('ui.draggable');
    }
    else
    {
     
drupal_add_js($path .'/ui.mouse.js');
     
drupal_add_js($path .'/ui.draggable.js');
    }
?>

the ui.mouse.js file is in the devel module, copy that to jquery_ui/jquery.ui/ui/minified/ui.mouse.min.js

I didn't bother to minified the file, just rename it.

#8

mattgilbert - October 23, 2009 - 16:03

I had this problem too.

It looks like this is another difference between the jquery package that's now available, and what the module anticipates. Mine didn't have the minified versions of the .js files, so,
/sites/example.com/modules/jquery_ui/jquery.ui/ui/minified/ui.core.min.js

didn't exist, but
/sites/example.com/modules/jquery_ui/jquery.ui/ui/ui.core.js

did. As a workaround, I made the minified versions by hand at http://www.minifyjs.com . Just copy the contents of ui.core.js, for example, compress it, and save it as minified/ui.core.min.js. Make sure to cover any dependencies, or just tediously minify all of the files, and it should work out. Obviously, this is just a work-around, and not a particularly pleasing one.

#9

mattgilbert - October 23, 2009 - 16:22

This seems to break jquery ui theme links though...

#10

agentdcooper - October 24, 2009 - 00:54

thanks for the info guys, I had the error warning: file_get_contents(sites/all/modules/jquery_ui/jquery.ui/ui/minified/ui.mouse.min.js) [function.file-get-contents]: failed to open stream: No such file

I implemented a combination of #7 and #8 ;;

# cp -p /drupal/sites/all/modules/devel/ui.mouse.js /drupal/sites/all/modules/jquery_ui/jquery.ui/ui/minified/ui.mouse.min.js

- went to http://www.minifyjs.com/javascript-compressor/
- "minified the code"
- overwrote the "minified code" to the file /drupal/sites/all/modules/jquery_ui/jquery.ui/ui/minified/ui.mouse.min.js

for me, total difference in file size = 3143 bytes
[+] original file /drupal/sites/all/modules/devel/ui.mouse.js = 9406 bytes
[+] my minified file /drupal/sites/all/modules/jquery_ui/jquery.ui/ui/minified/ui.mouse.min.js = 6263 bytes

#11

khaiheller - October 26, 2009 - 16:18

Had the same jquery_ui & devel conflict.

Found a super solution at http://endorkins.com/?p=13

No more conflict.

:-)

#12

drupal_hhp - October 27, 2009 - 15:10

Had the same problem. Solution#10 worked like a charm. Anyway the developer could give provide a heads up about this conflict in the Readme.txt file?

#13

mbutcher - October 30, 2009 - 16:46
Version:6.x-1.3» 6.x-1.x-dev
Status:active» needs review

jQuery UI provides three different compression settings: 'none', 'minified', and 'packed'. The problem is that the 'minified' setting is set as default, and there is no admin interface to change this setting. (You can edit the variable table directly, but that's rarely a good idea.)

Attached is a patch that sets 'none' (no compression) as the default setting.

ABOUT THE PATCH
============
The patch is against jquery_ui DRUPAL-6--1. It should apply cleanly to both the dev branch and the 1.3 release.

To patch:
- Copy the patch file into the jquery_ui/ module directory
- patch it using the command 'patch -p0 578402-jquery_ui-1.patch' or your patching tool of choice

OTHER NOTES:
==========

Initially, I was going to add an admin interface to select minified and packed versions, but as it appears that those compression schemes are no longer available from the jQuery UI team, I just left this patch minimal. If people want a UI to change that, I would be happy to add that as a different patch on a different issue.

Also of note, the new jQuery UI packaging includes both an all-in-one jQuery UI file (ui/jquery-ui-1..custom.js), and an all-in-one jqueryvUI minified version (jquery-ui-1..custom.min.js -- it's not in the ui/ directory). In the future, I could imagine adding another option to include these. AGAIN, though... different issue, and not directly related to this patch..

AttachmentSize
578402-jquery_ui-1.patch 2 KB

#14

tomws - November 19, 2009 - 18:13

mbutcher's patch (mostly) works for me. The CHANGELOG portion barfs, but the .module changes work. Fixing up the broken part ought to work for flagging this as reviewed and tested. Note that this problem also persists in 6.x-1.x-dev 2009-Aug-08.

For reference, I've also applied #388384: Allow usage of jQuery UI themes from the themeroller in an attempt to make this work with the date module's datepicker. (See #637542: Date popup module fails to load jquery ui theme.)

 
 

Drupal is a registered trademark of Dries Buytaert.