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.
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
Comment #1
riccardoR CreditAttribution: riccardoR commentedI 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:
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().
Comment #2
stella CreditAttribution: stella commentedFixed. However the 'view original image' permission comes from the Image module.