path_to_theme() call breaks site off-line page
prof1337 - May 3, 2009 - 04:53
| Project: | jQuery Lightbox |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
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:
- Enable the jQuery Lightbox module.
- Take your site off-line.
- Log out.
- You will be greeted by your site-off-line message in plain text, the page devoid of any theme/styling whatsoever.
The simple fix is to add an exception for when the site is off-line.
| Attachment | Size |
|---|---|
| jlightbox_maint_fix.patch | 866 bytes |

#1
Nice one!
#2
Committed to all branches. Thanks!
#3
Automatically closed -- issue fixed for 2 weeks with no activity.