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..

AttachmentSize
menu_default_local_task.png10.67 KB

#1

Jose Reyero - August 9, 2008 - 17:13
Project:Internationalization» Localization client
Version:6.x-1.x-dev» 6.x-1.x-dev

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

Gábor Hojtsy - September 9, 2008 - 09:45
Project:Localization client» Language Icons
Version:6.x-1.x-dev» 6.x-1.x-dev

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

hass - September 17, 2008 - 20:09

Same here. I'm with Garbor - we should use the 'Language negotiation' tab title.

#4

hass - September 17, 2008 - 20:24
Priority:minor» normal
Status:active» needs review

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...

AttachmentSize
D6_languageicons_tab_name_path_fix.patch 1.13 KB

#5

Freso - October 11, 2008 - 14:01
Version:6.x-1.x-dev» 6.x-2.x-dev

Could somebody please test that the patch works as expected? Thank you.

#6

Jose Reyero - February 2, 2009 - 01:25

I think this was caused by a bug in i18n module (menu_alter) already fixed so possibly no need for any patch here.

#7

hass - February 2, 2009 - 07:58

Jose: No, this patch needs to go in...

#8

Jose Reyero - February 2, 2009 - 10:35
Status:needs review» reviewed & tested by the community

@hass,

Yes, you're right, I had read the thread too quickly...

I've tried it and it works.

#9

Freso - February 2, 2009 - 15:18

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

hass - February 2, 2009 - 17:01

The menu refresh is not really required... all people should run update.php... on every module update.

#11

Freso - February 2, 2009 - 20:14
Status:reviewed & tested by the community» fixed

@ 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

System Message - February 16, 2009 - 20:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.