If a separate admin theme is in use when this module is enabled, the block admin theme page is broken and will only display for the admin theme itself; selecting another theme does not work as expected and changing block order on the non-admin theme becomes impossible. Disabling this module fixes the problem.

This is because a theme function is called during hook_init; see http://drupal.org/node/219910 for more information. This same problem was found in SimpleMenu, see http://drupal.org/node/336119 for details.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

beckyjohnson’s picture

For me, when I enabled this module, it made the admin menu disappear. I was using a custom theme plus garland for my admin theme.

Becky

mmironenko’s picture

This is because on hook_theme_registry_alter the module is saving callback of current theme to single variable, without any checks for used themes in system. Actually all we need is save callback for every theme to separate variable, like this:
variable_set('oldtheme_menu_item_link_'.$theme, $theme_overwrite);

To be clear whats happens in current version:
For example we have one theme for site frontend (Garland) and another for admin (rootcandy).
Of course we want to use site in production with disabled setting "Rebuild theme registry on every page".
For example we open admin page and in this time admin theme registry cache expires, drupal call rebuild registry, module saves menu_item_link callback of admin theme to variable. Then we open frontend page and if theme registry cache not expired, then module trying to show us menu with callback from admin theme. This is right for opposite succession.

Here is the simple patch.

Vote_Sizing_Steve’s picture

Subscribing

brunorios1’s picture

i'm having this problem after upgrading drupal core from 6.20 to 6.22

brunorios1’s picture

the problem happen with the combination of 4 modules (in both 6.20 or 6.22):

- Special Menu Items (http://drupal.org/project/special_menu_items)
- Me (http://drupal.org/project/me)
- Token (http://drupal.org/project/token)
- Real Name (http://drupal.org/project/realname)

i reproduced the error, feel free to test:

http://www.flashmedia.com.br/drupal622/admin/build/block

user: admin
pass: admin

you'll see that the bluemarine theme is active, when the garland theme should be active.

thanks!

gagarine’s picture

I think this https://github.com/gagarine/special_menu_items/commit/c38d3cd296eee16dd8... should fix the problem. I did it for the D7 version but is very easy to port.

btopro’s picture

sub

Mirabuck’s picture

I adapted mmironenko's patch from #2 for use with 6.x-1.6. Seems to be working. Github link above seems to be broken.

gagarine’s picture

Status: Active » Needs work

My github was merged in the official repository. So that the commit I was speaking about http://drupalcode.org/project/special_menu_items.git/commitdiff/c38d3cd?...

But check the current D7 version because I change some detail in the function name... but the main idea is still the same.