path_to_theme() call breaking blocks page

snelson - September 25, 2007 - 03:50
Project:jQuery Lightbox
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Might want to double check this on a clean install, but it seems as though the call to path_to_theme in jlightbox add is breaking the blocks admin page, not allowing blocks module to override the current theme when trying to edit blocks for a theme different than the admin theme. I was able to fix it by just commenting out the line:

<?php
//$css = path_to_theme() .'/jlightbox.css';
 
if (!file_exists($css)) {
   
$css = $path .'/css/jlightbox.css';
  }
?>

I think you can just pull out the css theme override altogether, as you can override css with css anyway.

Scott

#1

sun - September 25, 2007 - 10:41

In front of trying to reproduce this: If I understand you correctly, you have a separate administration theme and more than one theme enabled for your site. What is broken, if you then go to admin/build/block ?

#2

sun - September 26, 2007 - 22:07
Status:active» postponed (maintainer needs more info)

#3

snelson - September 28, 2007 - 15:54

Yes I have a site theme and a separate theme for admin. Typically, when you go to the admin/build/blocks page, Drupal switches to the theme you are currently editing blocks for. But, with your module enabled, the theme is not switching, its just staying on the admin theme, not allowing you to edit blocks for any other theme but admin.

#4

snelson - September 28, 2007 - 15:56

Where's my manners? I meant to thank you for a great module. Tried a couple other things and this was the best. Good work!

#5

alexis - September 28, 2007 - 17:23

Hey, even if I'm not using this module I can confirm that calling path_to_theme() from a module breaks block admin page. The problem seems to be the init_theme(), inside path_to_theme(), is resetting some theme related parameters.

#6

sun - September 28, 2007 - 23:59
Status:postponed (maintainer needs more info)» fixed

Thanks guys, especially @alexis for this hint.

Committed attached patch which does not load a theme-specific stylesheet if a page starting with admin/build/block is displayed.

AttachmentSize
admin_menu-DRUPAL-5.patch 1.79 KB

#7

Anonymous - October 13, 2007 - 00:01
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.