two active menu local tasks
Pasqualle - July 11, 2008 - 21:10
| Project: | Language Icons |
| Version: | 6.x-2.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
on page admin/settings/language/configure/language
there are 2 different menu_default_local_task-s when the l10n_client module is also enabled with i18n..
see attached picture..
| Attachment | Size |
|---|---|
| menu_default_local_task.png | 10.67 KB |

#1
I think this is l10n client's issue
I don't know what happens with that menu, but I see the two tabs causing trouble are l10n's. Maybe the issue happens when one more tab is added there (language icons) but I'm just adding a 'non default local task'...
Gabor?
#2
Localization client just adds the "Language negotiation" default tab and the "Localization sharing" non-default tab:
<?php// Direct copy of the Configure tab from locale module to
// make space for the "Localization sharing" tab below.
$items['admin/settings/language/configure/language'] = array(
'title' => 'Language negotiation',
'page callback' => 'locale_inc_callback',
'page arguments' => array('drupal_get_form', 'locale_languages_configure_form'),
'access arguments' => array('administer languages'),
'weight' => -10,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/settings/language/configure/l10n_client'] = array(
'title' => 'Localization sharing',
'page callback' => 'drupal_get_form',
'page arguments' => array('l10n_client_settings_form'),
'access arguments' => array('administer languages'),
'weight' => 5,
'type' => MENU_LOCAL_TASK,
);
?>
Looks like i18n is also adding a defualt tab there. I have no idea ATM on how could we avoid multiple contribs putting in default tabs there. I also think that l10n_client is adding a more specific default tab title, which is better to use instead of just plain "Configure". I'd try using the same default tab code in Language icons, and see what happens.
#3
Same here. I'm with Garbor - we should use the 'Language negotiation' tab title.
#4
Patch attached copies 1:1 the menu item from l10n_client. We might need a menu refresh in .install for people upgrading from older versions...
#5
Could somebody please test that the patch works as expected? Thank you.
#6
I think this was caused by a bug in i18n module (menu_alter) already fixed so possibly no need for any patch here.
#7
Jose: No, this patch needs to go in...
#8
@hass,
Yes, you're right, I had read the thread too quickly...
I've tried it and it works.
#9
Thanks for testing, Jose!
I'll commit this once I get back to my private development machine. (And per #4, I'll add a menu_rebuild() to a hook_update_600N, just to play it safe.)
#10
The menu refresh is not really required... all people should run update.php... on every module update.
#11
@ hass: Alright. Thank you. :)
I've committed the patch to 6.x-2.x and 6.x-1.x and once I've committed the flag icons waiting in the queue, I'll make a 6.x-1.1 release.
Thanks for the help and inputs everyone! :)
#12
Automatically closed -- issue fixed for 2 weeks with no activity.