Not working at all in locales using comma for decimal point
| Project: | Lightbox2 |
| Version: | 6.x-1.9 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Initial value for the variable ''lightbox2_overlay_opacity' is 0.8 - notice lack of quotes, it is a floating point number.
When rendered as JavaScript (in Drupal.settings) in a Polish locale, this number is written out as 0,8 - please notice the comma. This comma totally breaks the { } construct in JavaScript. This will happen in any locale that uses a comma as the decimal point.
One fix is simply opening the settings page (admin/settings/lightbox2) and clicking the submit button, which will save said variable as "0.8".
If we want lightbox2 working right out of the box, the 'lightbox2_overlay_opacity' variable should be initialized to be a string.
Patch for the lightbox2.module file is attached.
| Attachment | Size |
|---|---|
| lightbox2.module.patch | 724 bytes |

#1
#2
Seems like the problem is rooted much deeper than lightbox itself.
http://drupal.org/node/614124