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
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

frjo’s picture

Category: bug » support
Status: Active » Fixed

You need to install version 2 of the Libraries API module.

http://drupal.org/project/libraries

astra’s picture

Status: Fixed » Active

Go to sites/all/libraries/libraries to view the file libraries.info, I can see information:

name = Libraries
description = Allows version dependent and shared usage of external libraries.
core = 7.x
files[] = tests/libraries.test

; Information added by drupal.org packaging script on 2012-07-29
version = "7.x-2.0"
core = "7.x"
project = "libraries"
datestamp = "1343561873"

That means my site is running with the version 2 of the Libraries API module. Should it be other reasons for the fatal error?

frjo’s picture

Then it should work. Is the Libraries module active? Test clear the cache?

astra’s picture

Where 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!

steinmb’s picture

The 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.

stBorchert’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Issue summary: View changes
Status: Active » Needs review
FileSize
509 bytes

Updating 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().

steinmb’s picture

Status: Needs review » Reviewed & tested by the community

  • frjo committed f79b458 on 7.x-2.x authored by stBorchert
    Issue #1851590 by stBorchert | astra: Fatal error for updating to...
frjo’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Alauddin’s picture

Just 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

ChrisValentine’s picture

Have 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.

agm24021982’s picture

Hi, 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)

liquidcms’s picture

still 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.