I just upgraded Lightbox2 to version 5.x.2.10 on my dev server and the module stopped working.

The following javascript error is reported:

Uncaught TypeError: Object #<an Object> has no method 't'     (on lightbox.js at line 147)

I found that several calls to Drupal.t — not available on D5 — have been inserted in lightbox.js
IMO the issue was caused by unintentionally committing a D6 patch #875980: 508 compliance for lightbox2 also on D5 http://drupal.org/cvs?commit=425598

Comments

riccardoR’s picture

I did more testing with an image gallery based on Views/CCK/Lightbox2.
After removing all calls to Drupal.t from lightbox2.js the overlay restarted working, except that image captions were not displayed.
I fixed it with this change:

--- lightbox.js 2010-09-23 03:14:24.296875000 +0200
+++ lightbox.fix.js 2010-09-23 03:14:38.890625000 +0200
@@ -1126,7 +1126,7 @@
   filterXSS: function(str, allowed_tags) {
     var output = "";
     $.ajax({
-      url: Drupal.settings.basePath + 'system/lightbox2/filter-xss',
+      url: Drupal.settings.lightbox2.base_path + 'system/lightbox2/filter-xss',
       data: {
         'string' : str,
         'allowed_tags' : allowed_tags,

I also noticed that in lightbox2.php there are two calls to user_access('view original image') on lines 1494 and 1551, but that permission is not defined in lightbox2_perm().

stella’s picture

Status: Active » Fixed

Fixed. However the 'view original image' permission comes from the Image module.

Status: Fixed » Closed (fixed)

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