Block admin pages broken for all but active theme

ximo - August 26, 2009 - 09:47
Project:Cufon
Version:6.x-1.0-beta4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Cufón indirectly sets the theme too early, stopping the block admin pages from setting the theme for each enabled theme's local task. This means you can't edit blocks for any themes other than the enabled one (either administration theme or your selected theme).

I traced this down to cufon_init() calling _cufon_discover_fonts() which in turn calls path_to_theme(). Because the theme hasn't been set at this point, the function calls init_theme(), setting the theme to the default one. When block_admin_display_form() later tries to specify the theme to display using the $custom_theme global, init_theme() will bail out having already enforced a theme.

Disabling the line in cufon.module calling path_to_theme() fixed this.

#1

davideads - August 26, 2009 - 20:23

Thanks for the useful bug report. This got me on the right track. The current CVS version should sidestep this issue by discovering fonts later in the Drupal execution stack, at the expense of uglier code. (See this thread for a discussion on what's appropriate in hook_init(), which is where I screwed up. And people wonder why I prefer Python...).

Please test -- I'll roll a release and some additional tests in a few days if everything seems to be working properly.

#2

davideads - August 27, 2009 - 12:44
Status:active» needs review

Fixed in 6--1-0-BETA4 -- please give it a shot!

#3

ellishettinga - October 18, 2009 - 10:19
Version:6.x-1.0-beta3» 6.x-1.0-beta4

I installed Cufon version 6.x-1.0-beta4 on drupal 6.14

I use a custom theme for de site, and Garland for the admin pages.

admin/build/block unfortunately shows the custom theme
because my custom theme has a fixed height, it makes it impossible to scroll down to the block I want to edit

as soon as you start configuring a block the admin theme is shown again

Am I the only one with this issue in beta4?

 
 

Drupal is a registered trademark of Dries Buytaert.