When enabling the option "Use administration language in the administration menu" the page title for some pages are missing.

To reproduce:

  1. Enable the setting
  2. Create a vocabulary
  3. Go to the list page for that vocabulary, admin/structure/taxonomy/
  4. The name of the vocabulary should be used as the page title, but it's not
  5. Disable the setting and reload the page. The title is now back in place.

The setting is affecting the code within admin_language_translated_menu_link_alter(). I don't know what's going on, but I've tried to put a return statement in the first line of code within the function, and that removes the problem. So the problem is definitely related to that setting.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

donquixote’s picture

Also on pages like admin/structure/types/manage/%, the page title will be "Edit content type" instead of the name of the content type being edited.

This happens because admin_language_translated_menu_link_alter() calls _menu_item_localize() with $link_translate === TRUE.

Stack trace:
15: _menu_item_localize() (Array, 4 elements)
14: admin_language_translated_menu_link_alter() (Array, 5 elements)
13: drupal_alter() (Array, 4 elements)
12: _menu_link_translate() (Array, 3 elements)
11: menu_set_active_trail() (Array, 1 element)
10: menu_get_active_trail() (Array, 1 element)
9: menu_get_active_breadcrumb() (Array, 1 element)
8: drupal_get_breadcrumb() (Array, 1 element)
7: template_process_page() (Array, 3 elements)
6: theme() (Array, 3 elements)
5: drupal_render() (Array, 2 elements)
4: drupal_render_page() (Array, 2 elements)
3: drupal_deliver_html_page() (Array, 2 elements)
2: drupal_deliver_page() (Array, 3 elements)
1: menu_execute_active_handler() (Array, 1 element)
0: main() (Array, 2 elements)

donquixote’s picture

Local hack I am going to try for a while:

@@ -79,7 +79,7 @@ function admin_language_translated_menu_link_alter(&$item, $map) {
       $language = $_admin_language;
 
       // ...modify the menu item...
-      _menu_item_localize($item, $map, TRUE);
+      _menu_item_localize($item, $map, FALSE);
       if ('user/logout' == $item['link_path']) {
         $item['title'] = t('Log out');
       }
brtamas’s picture

Thanks for fix. I have created a patch with this.

brtamas’s picture