I have followed the COMMAND LINE USERS instructions for the latest version of Shadowbox with a fresh install of Shadowbox.

After enabling the module in the admin interface (not with Drush), I get this warning:

Shadowbox: A language file does not exist for your language: English (en). Tried to load: /languages/shadowbox-en.js. You can resolve this by either copying an existing language file and renaming the file or creating a new language file. Using either method you must use the 2-letter code for your language so the filename has the form: shadowbox-xx.js where xx is your 2-letter language code.

And in the status report:

In order for the Shadowbox module to work correctly, the Shadowbox 2.0 Full distribution must exists at .

I have unpacked the latest Shadowbox library here:
sites/all/plugins/shadowbox-build-3.0b

What am I missing?

CommentFileSizeAuthor
#3 shadowbox_location.patch718 bytesderjochenmeyer

Comments

aacraig’s picture

Upon further investigation, I found that the failure is in shadowbox.install at line 32

    $path = variable_get('shadowbox_location', $shadowbox_path);
    if (!file_exists($path)) {
      $requirements['shadowbox'] = array(
        'title' => $t('Shadowbox'),
        'description' => $t('In order for the Shadowbox module to work correctly, the Shadowbox 2.0 Full distribution must exists at %path.', array('%path' => $path)),
        'severity' => $phase == 'install' ? REQUIREMENT_WARNING : REQUIREMENT_ERROR,
        'value' => $t('Install 3rd party Shadowbox software'),
      );
    }

In my installation, the 'shadowbox_location' variable has no value. Shoudn't this get set somewhere during installation? Again, this is a fresh install.

aacraig’s picture

The problem is caused by the uninitialized variable in two places, one in the comment above, and another in shadowbox.module on line 352.

When I initialize the variable with an appropriate value, the module works, with the variable_get function failing as expected with a sane default value when no value is found in the database.

Sorry about the mulitple posts!

derjochenmeyer’s picture

StatusFileSize
new718 bytes

Here is a patch.

To apply manually add ONE LINE in line 352 of shadowbox.module

  $shadowbox_path = 'sites/all/plugins/shadowbox'; // this line is missing
  $shadowbox_location = variable_get('shadowbox_location', $shadowbox_path);

AND in line 33 of shadowbox.install

  $shadowbox_path = 'sites/all/plugins/shadowbox'; // this line is missing
  $path = variable_get('shadowbox_location', $shadowbox_path);
derjochenmeyer’s picture

Status: Active » Needs review
psynaptic’s picture

Status: Needs review » Fixed

Thanks guys:

http://drupal.org/cvs?commit=264174

Committed to DRUPAL-6--3

Steve Dondley’s picture

Can I recommend someone release this patch into 3.1 ASAP so people don't go through the frustration I had to go through this morning?

Steve Dondley’s picture

Version: 6.x-3.0 » 6.x-3.x-dev

this is not fixed in 3.0. It is fixed in 3.0-dev. I'm reflecting that here.

Status: Fixed » Closed (fixed)

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