Needs work
Project:
jQuery Lightbox
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 May 2009 at 04:53 UTC
Updated:
19 Apr 2011 at 08:39 UTC
Similar to #178364: path_to_theme() call breaking blocks page, the call to path_to_theme() in jlightbox_add() causes Drupal's site-off-line page to go completely un-themed. I believe this occurs because jlightbox_init() calls jlightbox_add(), and calls to theme functions in hook_init() are not supported.
See #219910: Calling theme function from hook_init() interferes with administration theme for more information.
To replicate:
The simple fix is to add an exception for when the site is off-line.
| Comment | File | Size | Author |
|---|---|---|---|
| jlightbox_maint_fix.patch | 866 bytes | eromba |
Comments
Comment #1
sunNice one!
Comment #2
sunCommitted to all branches. Thanks!
Comment #4
maciej.zgadzaj commentedActually, that's not enough. It helps with offline mode, but if you try to programmatically change current theme from your module in hook_init() updating $custom_theme variable, it is not going to work again (unless you fiddle with module weights).
In my opinion call to path_to_theme() should be ditched from there completely. If someone needs to override styles, it can be easily done through any of the already existing theme CSS files, no real need to load specific jlightbox.css, especially if it breaks the workflow...