Closed (fixed)
Project:
Lightbox2
Version:
5.x-2.x-dev
Component:
Javascript
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Sep 2010 at 00:44 UTC
Updated:
7 Oct 2010 at 09:30 UTC
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 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 commentedFixed. However the 'view original image' permission comes from the Image module.