Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Updated from Colorbox 1.3 to 2.0, my site got en error:
Fatal error: Call to undefined function libraries_load() in .../sites/all/modules/colorbox/colorbox.module on line 217
Comment | File | Size | Author |
---|---|---|---|
#6 | undefined_function_libraries_load-1851590-6.patch | 509 bytes | stBorchert |
Comments
Comment #1
frjo CreditAttribution: frjo commentedYou need to install version 2 of the Libraries API module.
http://drupal.org/project/libraries
Comment #2
astra CreditAttribution: astra commentedGo to sites/all/libraries/libraries to view the file libraries.info, I can see information:
That means my site is running with the version 2 of the Libraries API module. Should it be other reasons for the fatal error?
Comment #3
frjo CreditAttribution: frjo commentedThen it should work. Is the Libraries module active? Test clear the cache?
Comment #4
astra CreditAttribution: astra commentedWhere can I activate the Libraries module? I can't find it from the module list of my site by admin (user id = 1).
My Libraries API 2.0 was uploaded to sites/all/libraries. Is it the right place?
Thanks for help!
Comment #5
steinmb CreditAttribution: steinmb commentedThe libraries is a module and should be placed with the other modules 'sites/all/modules' enable it a any normal module.
If you are unable to enable the libraries module due to errors coming from colorbox regarding unknown function. Uncomment the line doing libraries_load(), install the libraries module and uncomment the line.
Comment #6
stBorchertUpdating Colorbox from 1.x to 2.x is nearly impossible if you haven't installed Libraries before.
If you update to the newest version of Colorbox you'll will be stuck into the error described above without a chance to install Libraries afterwards.
Since uncommenting a line in the module is no option on automatic deployment, here is a patch to solve the problem. It simply checks if library is activated before calling
libraries_load()
.Comment #7
steinmb CreditAttribution: steinmb commentedComment #9
frjo CreditAttribution: frjo commentedComment #11
Alauddin CreditAttribution: Alauddin commentedJust an FYI for anyone doing the upgrade from colorbox 1x to 2x
here are my steps that worked
1) update the libraries to 2x first
2) disable Colorbox 1x (do not uninstall as you want to keep the configured format settings)
3) Remove the old 1x module as well as the old library/colorbox
4) add new colorbox lib - https://github.com/jackmoore/colorbox/archive/1.x.zip
5) download / enable the latest colorbox 2x module
6) run db updates - yes, there are 3 updates
7) clear cache
hope that helps
Comment #12
ChrisValentine CreditAttribution: ChrisValentine commentedHave just run into this myself. What a mess! Is there no newer Colorbox library than the one linked to in #11? Or don't I need to worry about that?
Chris.
Comment #13
agm24021982 CreditAttribution: agm24021982 commentedHi, how I can run the patch. I have the same error but I can update or desactivate colorbox plugin.
the check button is unable
Libraries
7.x-1.0 Allows version dependent and shared usage of external libraries.
Necesitado por: Colorbox (activado), JW Player (activado), LESS CSS Preprocessor (activado), LESS CSS Preprocessor - DEMO (desactivado), Zencoder API (desactivado)
Comment #14
liquidcms CreditAttribution: liquidcms commentedstill no luck upgrading from 1.x to 2.10
- i already had Libraries 2.0
- i updated module to 2.10
- ran updates (3 of theme)
i have a grid view of imgs which when clicked simply open the image in a new page.
will go back to old version for now.