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
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:

  1. Enable the jQuery Lightbox module.
  2. Take your site off-line.
  3. Log out.
  4. 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.

AttachmentSize
jlightbox_maint_fix.patch866 bytes

#1

sun - May 6, 2009 - 21:55
Status:needs review» reviewed & tested by the community

Nice one!

#2

sun - May 6, 2009 - 23:57
Status:reviewed & tested by the community» fixed

Committed to all branches. Thanks!

#3

System Message - May 21, 2009 - 00:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.