Copied Library API module to modules folder and the upgrade completed successful. Before it complained about missing Libraries API.

Fatal error: Call to undefined function libraries_detect() in sites\all\modules\colorbox\colorbox.admin.inc on line 14

It looks like colorbox does not enable Libraries API module in the upgrade path. This causes sites to crash.

CommentFileSizeAuthor
#5 enable_libraries-1986282-5.patch4.57 KBAnonymous (not verified)
#3 enable_libraries-1986282-3.patch4.6 KBAnonymous (not verified)

Comments

frjo’s picture

Category: bug » support
Priority: Major » Normal

Colorbox list Libraries 2.x as a dependency but if it's not activated automatically you need to do it manually.

helmo’s picture

Issue summary: View changes

The 'right' way to do this would be a colorbox_update_7203() function which calls module_enable() after checking.

Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new4.6 KB

Added patch to enable libraries, and to also check libraries version in colorbox_requirements()

hass’s picture

Version: 7.x-2.4 » 7.x-2.x-dev
Status: Needs review » Needs work
  1. +++ b/colorbox.install
    @@ -13,32 +13,53 @@ function colorbox_requirements($phase) {
    +        'description' => $t('You need to download and enable the !libraries.', array('!libraries' => l($t('Libraries module'), 'https://www.drupal.org/project/libraries'))),
    

    This is not allowed. Never use l() here.

  2. +++ b/colorbox.install
    @@ -13,32 +13,53 @@ function colorbox_requirements($phase) {
    +          'description' => $t('You need to download a later version of the !libraries.', array('!libraries' => l($t('Libraries module'), 'https://www.drupal.org/project/libraries'))),
    

    Same bug

  3. +++ b/colorbox.install
    @@ -13,32 +13,53 @@ function colorbox_requirements($phase) {
    +          'description' => $t('!error You need to download the !colorbox, extract the archive and place the colorbox directory in the %path directory on your server.', array('!error' => $error_message, '!colorbox' => l($t('Colorbox plugin'), $library['download url']), '%path' => 'sites/all/libraries')),
    

    Same bug again.

  4. +++ b/colorbox.install
    @@ -13,32 +13,53 @@ function colorbox_requirements($phase) {
    +          'description' => $t('You need to download a later version of the !colorbox and replace the old version located in the %path directory on your server.', array('!colorbox' => l($t('Colorbox plugin'), $library['download url']), '%path' => $library['library path'])),
    

    Same bug again.

Anonymous’s picture

Status: Needs work » Needs review
StatusFileSize
new4.57 KB

Updated patch

neslee canil pinto’s picture

Status: Needs review » Needs work

Patch failed to apply.

neslee canil pinto’s picture

Status: Needs work » Closed (outdated)