This is just for those Drupal 7 users who have settled on entity translation for everything including taxonomy. You have disabled all modules related to content node translation.

You have the latest version 1.4 of taxonomy menu installed. Not the dev version but that might be ok I dont know as I have not tried the dev version of 1.4

To get the menu item names generated with the translated taxonomy terms using the localize option in taxonomy you need to make a small change to the taxonomy menus module.

edit taxonomy_menu.module

find:

 // FIXME: i18nmenu need to be cleaned up to allow translation from other menu module
  if (module_exists('i18n_menu')) {
    $link['options']['alter'] = TRUE;
    $link['language'] = $item['language'];
    $link['customized'] = 1;
  }

and change it to the following

 // FIXME: i18nmenu need to be cleaned up to allow translation from other menu module
  if (module_exists('i18n_menu')) {
    $link['options']['alter'] = TRUE;
 //  set the menu language link to und always to allow translated entity field links to work
 //  $link['language'] = $item['language'];
     $link['language'] = 'und';
    $link['customized'] = 1;
  }

I don't think there are going to be any more updates to the 1.4 branch as the work is all on 2.0 as far as i can see in the commits. There was a major patch for 1.4 that also addressed this but i think it has been abandoned and i tried the alpha version of 2.0 but it does not even solve this issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

inventlogic’s picture

Status: Active » Fixed

This is for reference more than anything as I don't expect it to get into 1.4 as 2.0 is where all the effort is going. So fixed.

hles’s picture

Assigned: inventlogic » Unassigned
hles’s picture

Version: 7.x-1.4 » 7.x-2.x-dev
Status: Fixed » Active

Let's check if there is that kind of problem with 7.x-2.x. These line of codes were removed for the sake of simplicity in 7.x-2.x as they would be added again when we would work later on the i18n integration. Let's keep it open.

deanochips’s picture

works for me.

ps: the DEV version currently does not expose menu to entitys under the Translate interface

i believe its due to
customized = 0

where it should be
customized = 1

deanochips’s picture

i also commented out

          //   watchdog('error', 'Menu and taxonomy name mismatch: @title != @name', array('@title' => $item['title'], '@name' => $term->name . $display_num));

to stop watchdog getting flooded with errors like:

Menu and taxonomy name mismatch: Chemical Reactions != Chemische Reaktionen

killua99’s picture

So this still broken ...

Aambro’s picture

I have my dblog also flooded with notices of this type of error: Menu and taxonomy name mismatch: Kopalnica != Bathroom

The menu itself works as it should. I am using Commerce Kickstart 2 + taxonomy menu with default (not kickstart taxonomy) path type.

http://i.imgur.com/1IOzGWQ.png

bofrost’s picture

Version: 7.x-2.x-dev » 7.x-1.5
Status: Active » Needs review
FileSize
1.75 KB

I am not sure if version 7.x-2.x is still in development but in the actual version 7.x-1.5 this will still happen.
The reason is very simple to explain. The taxonomy_menu module compares the link title in the given language with the term name in that language. But with entity translation we have everytime the source language (e.g. en) for our term and the fields are translated. And here is the problem you shouldn't compare withe term name name, you should compare with term name_field. But anyway, there is no need for this watchdog message when you use ET. Just apply the patch and the error is away.

bofrost’s picture

my patch was created wrong have to remove this one from #8 attached is a working patch for 7.x-1.x-dev

jenlampton’s picture

Status: Needs review » Needs work

I'm not sure what the status of this is, it looks like the last patch is missing the meat of the fix. If anyone is still having this problem I'd love to know if the patch in #8 helps or not.