Now that libraries 2 is in full and recommended release (with 3x already underway), and part of standard/typical installs,
drush rl libraries
------- RELEASES FOR 'LIBRARIES' PROJECT -------
Release Date Status
7.x-3.x-dev 2012-Jul-30 Supported, Development
7.x-2.x-dev 2012-Jul-29 Development
7.x-2.0 2012-Jul-29 Supported, Recommended, Installed
7.x-1.x-dev 2011-Feb-25 Development
7.x-1.0 2011-Jan-27 Supported
Can we get any new info on roadmap for filedepot's support of Libraries 2? Atm, of course, it's still reporting:
drush pm-enable filedepot
Module filedepot cannot be enabled because it depends on libraries (1.x) but 2.0 is available [error]
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | filedepot_librariesv2.patch | 5.75 KB | _timpatrick |
Comments
Comment #1
markus_petrux commentedHi, I think this is caused by #1734828: Explicitly declare libraries 1.x dependency, that added explicit requirement of v1 of libraries module, while it could have been a better approach, with future in mind, to review the way external libraries are managed here, and adapt installation instructions and/or use of libraries API. Cheers
Please note there may be other module in the site that require latest versions of Libraries API. Keeping v1 and v2 of the same module is not possible I'm afraid.
Comment #2
drupsup commentedHi,
I'm not asking what it's caused by -- that's fairly clear: It's not compatible with libraries v2x.
In a number of posts, including, e.g.:
https://drupal.org/node/1589586
The reasoning repeatedly given for non-compatibility has been that v2x is "still in alpha" ...
As that's now clearly changed, my question is, simply, what are the plans for v2x support, if any exist ?
Libraries v2x is no longer an option for many.
Since concurrent version install of v1x & v2x is a no-go, that renders Filedepot non-functional for now.
Comment #3
_timpatrick commentedVersion 2 of the libraries is now supported.
I committed the changes and attached is a patch based off the latest dev release.
To use:
Assuming your libraries folder is located at sites/all/libraries, create the following directories:
- sites/all/libraries/html_encoder
- sites/all/libraries/jquery.blockui
The following javascript files then need to be retrieved and saved to their respective folders under the sites/all/libraries folder.
> http://www.strictly-software.com/scripts/downloads/encoder.js - SAVE FILE as: sites/all/libraries/html_encoder/html_encoder.js
> http://malsup.github.com/jquery.blockUI.js - SAVE FILE as sites/all/libraries/jquery.blockui/jquery.blockui.js
Hope this fixes the issues you were encountering.
Thank you
Comment #4
drupsup commentedNot quite. Something's still awry.
A fresh pull of filedepot -dev, patch applied,
clear all caches, visit
https://testl.loc/filedepot
I get a blank/empty Filedepot UI.
In JS console I still see,
Comment #5
_timpatrick commentedHmm that error you are getting is not related to a missing library.
Check out:
http://stackoverflow.com/questions/4681309/using-jquery-in-drupal-7
The error you would get for a missing library would be jQuery.blockUI is not defined.
Tim
Comment #6
drupsup commentedMinor edit, what's above is what get's cp'd-n-pasted via Firebug's "Copy Error":
What I actually *see* in the Firebug Console is:
And jQuery is most certainly installed; it's in wide use across my site.
Comment #7
_timpatrick commentedThat error is pointing to the fact that jQuery itself has not been defined, not the blockUI module.
The error that would point to the library file not being included is:
You can check to see if the library is being included by simply looking at the sources window in firebug - I think this issue is related to the link I sent, something to do with $ being overwritten.
Also:
What is the output of libraries_get_libraries() ?
Do the files that exist at https://testl.loc/sites/all/libraries/html_encoder/html_encoder.js and https://testl.loc/sites/all/libraries/block.ui/block.ui.js contain the proper JS code?
Can you try un-enabling Filedepot in the module administration area and then re-enabling to flush the hook cache?
Comment #8
drupsup commentedViewsource @ https://test.loc/Filedepot
libraries_get_libraries() -->
Not sure what's "proper". Here's what I have:
cat https://testl.loc/sites/all/libraries/html_encoder/html_encoder.js
cat https://testl.loc/sites/all/libraries/block.ui/block.ui.js
Did that. Also a `drush cc all`. As well as a complete uninstall/reininstall. The issue -- the blank UI -- is consistently reproducible.
Comment #9
_timpatrick commentedThanks!
It seems from what you have posted the libraries have been included - and have the proper code in them (I am assuming the "cat x" at the top of the pastebin files was put there for readability and is not in the original file).
Since the error is "jQuery is not defined", it makes me think its still related to http://stackoverflow.com/questions/4681309/using-jquery-in-drupal-7
The easiest way to make sure its not Filedepot's fault / the blockUI libraries fault is to simply pull head b6336f7 (the revision before the v2 update) and try that. You should get the same error. If not, I wonder if the jQuery.blockUI library needs to be wrapped - maybe its interfering with another JS library another module you have installed is using.
Did you add any custom JS to your site that is referencing the $ variable?
Taking the fix from the stackoverflow website, perhaps putting the following code around the jQuery blockui function in jquery.blockui.js would work:
At the top of the jquery function ";(function() {", add this line:
;(function ($) {So it looks like this now:
And at the bottom add this line:
})(jQuery);So the bottom looks like this now:
That is the fix for the jQuery is not defined error in Drupal if the block ui library is causing it - let me know if it works.
Comment #10
drupsup commentedThat's correct.
Ref: http://drupalcode.org/project/filedepot.git/commit/96de80a
Returns same error
Did you add any custom JS to your site that is referencing the $ variable?
Yes,
applying
Filedepot UI is still blank.
JS console Error still displays:
Comment #11
drupsup commentedtitle & category change
Comment #12
_timpatrick commentedThe error isn't from Filedepot - it just shows up because Filedepot uses jQuery to load, and if the jQuery object is missing then it won't load, hence the white screen and error "jQuery is not defined".
I believe it is the custom JS code - that is what the stackoverflow article I linked to seems to think too.
You could always test that by removing the custom JS code and seeing if the jQuery object is back.
Are you sure that is the only custom JS code you have? Everything has to be wrapped in the "function ($) {" etc wrappers if you are referencing the $ variable as per the stackoverflow article.
Comment #13
drupsup commentedYes. I add those two, and only those two, JS stanzas.
Removing them has no effect -- the Filedepot UI is still blank, and the console error is the same.
Just for reference, none of my other installed module's output has any issues -- JS-related or otherwise.
Comment #14
drupsup commentedComment #15
drupsup commentedtitle update
Comment #16
drupsup commentedFyi, @ https://drupal.org/project/labjs, there are apparently methods to disable labjs for all/some script:
"Module developers can indicate which code should not be labjsified."
"To disable LABjs in certain pages, call labjs_suppress(TRUE) in those page. Useful for admin pages for example."
although, it's not apparent that either of those address the loading/use of an additional JS-loader ...
Note:
https://drupal.org/project/labjs
"LABjs won't have a D8 release. ... The LABjs library has stopped its future development in favor on AMD loaders."
and that there's discussion underway for selection/integration of a JS_loader into Drupal core:
"Script loader support in core (LABjs etc.)"
https://drupal.org/node/1033392
"Use AMD for JS architecture"
https://drupal.org/node/1542344
In any case, the Filedepot's loader-usage should not conflict with the use of a site-wide JS-loader.
Comment #17
stboch commentedIncase anyone is getting this issue. I found out that it related to the Case Sensitivity of unix. The site downloaded the file as jquery.blockUI.js and it needs to be jquery.blockui.js. Hopes this helps some!
Comment #18
_timpatrick commentedYup case sensitivity is important - in the original issue however the file was named properly.
Comment #19
mfuggle commentedI have been trying to get Filedepot working for three days now and have given up. I am getting the error that is being reported elsewhere (Object function has no method 'blockUI') but I can find no solution to this.
It's a pity since it seems to be what I want but without a solution from the developers on a very specific error it's of no value.
Cheers
Martin Fuggle
Comment #20
blainelang commentedMartin, in all cases, the issue is not something the developer can solve in code. If someone does not create the external libraries with the correct name or places them in the correct location - this is not a module code issue.
Are you using the libraries module 1.x or 2.x?
What version of filedepot are you using (the dev release or beta2)?
Eliminate other possible conflicts (modules, theme or other custom javascript)
Comment #21
webking_amsterdam commentedCould anyone tell me where to download the YUI library 2.7.0 or whether the version yui 2.9.0 can be used to serve that library on the server for the Filedepot module ?
From the site: https://github.com/yui/yui2 and http://yuilibrary.com/projects/yui2/ I could only download the version Yui_2.9.0 zip
I did not succeed in finding it elsewhere from a reliable source ....
Comment #22
meecect commentedI had a similar problem and tracked it down to my combination of jquery_update and jquery.blockui. Changing jquery versions to 1.7 fixed it for me.
Comment #23
suncorjohn commentedUpdated to latest version of jquery, still no luck in Drupal 7 site. Just hangs on Please wait.. dialog