Hi everyone,

We've having a few problems with our Administration Theme not displaying when you're in the admin section.

We've got a nice custom theme for the rest of the site, and we'd like Garland for the admin section. So we've set it, and we've also enabled the Garland theme, and we've had no joy.

We can turn Garland on for the entire site just fine, but when Drupal is left to turn it on for the Admin area only it fails.

We've not made any unusual theme calls or manipulation, and we don't have interfering modules (such as the one which changes the theme based on the path).

Any ideas?

Cheers,
-Fin

Comments

yched’s picture

this is usually caused by some module making a call to theme() before system_menu(!$may_cache) gets a chance to set the admin page [edit] theme.
This call can be nested - also mind that the replacement %pattern in t('some %pattern', array('%pattern' => 'replaced text')) generates a call to theme('placeholder') ...

I debugged this a few times by placing the following code at the beginning of init_theme(), just before the drupal_bootstrap() call (that would be includes/theme.inc, line 39)

drupal_set_message('<pre>'. print_r(debug_backtrace(), TRUE) .'</pre>');

This lets you see the call sequence that leads to the first initialization of the current theme.

yched’s picture

of course, using a well-configured PHP debugger is even better :-)

ainigma32’s picture

Status: Active » Fixed

I'm going to assume this was solved using yched's input. Setting this to fixed.

Feel free to reopen if you think that is incorrect.

- Arie

Status: Fixed » Closed (fixed)

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