Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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:
//$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
Comment | File | Size | Author |
---|---|---|---|
#6 | admin_menu-DRUPAL-5.patch | 1.79 KB | sun |
Comments
Comment #1
sunIn 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 ?
Comment #2
sunComment #3
snelson CreditAttribution: snelson commentedYes 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.
Comment #4
snelson CreditAttribution: snelson commentedWhere's my manners? I meant to thank you for a great module. Tried a couple other things and this was the best. Good work!
Comment #5
alexis CreditAttribution: alexis commentedHey, 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.
Comment #6
sunThanks 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.
Comment #7
(not verified) CreditAttribution: commented