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.
How to reproduce the problem
- Enable themes A and B in /admin/build/themes
- Define A as default in /admin/build/themes
- Go to your user settings in /user//edit and define B as your theme
- Display /admin/build/block --> configuration for A is shown instead of B
Practically blocks for B are completely inaccessible, except you change the default theme.
How to fix the problem
Replace:
block.admin.inc, line 15:
--------------------------------------------
// If non-default theme configuration has been selected, set the custom theme.
$custom_theme = isset($theme) ? $theme : variable_get('theme_default', 'garland');
--------------------------------------------
With:
--------------------------------------------
// If non-default theme configuration has been selected, set the custom theme.
if (isset($theme))
{
$custom_theme = $theme;
}
elseif (!isset($custom_theme))
{
$custom_theme=variable_get('theme_default', 'garland');
}
--------------------------------------------
Comments
Comment #1
osmanNo patch is available in your post, thus hasn't been reviewed and tested by the community yet.
So changing the status to
Closed (cannot reproduce)Active for now.Please, read the Status settings for an issue and Advanced patch contributor guide.
Regarding the original issue, I tested with latest Drupal core 6.x-dev (2012-Feb-29) and cannot re-create the conclusion with the solution you provide. Confirm the "bug" still exists in latest 6.x release, and provide a patch file, which can be tested by the community.
Thanks,
Comment #2
mdupontThe solution provided performs exactly the same operation than the original code, how could it change something?