Steps to reproduce:
1. Install site with two languages (en-ru).
2. Create a node in En (node/1, for example), translate it to Ru (node/2). Set "about" as an url alias for both versions (you'll get "en/about" and "ru/about" on site).
3. Go Administer - Site building - Menus. Create custom menu.
4. Add first menu item with EN language, set "about" as a path (obviously, you can't set "en/about").
5. Add second menu item with RU language, set "about" as a path (same).

Expected result:
First menu item is linked to English version (node/1), second to Russian version (node/2).

Actual result:
Both menu items linked to the same node (node/1).

Explanation:
The standard validation function menu_edit_item_validate() tries to transforms menu item's path (which can be either url alias or just normal path) to normal path with simple drupal_get_normal_path($item['link_path']) call. It doesn't pass the second language parameter, which should be done to get the proper path in multilingual site. The solution is to pass custom validator before standard and properly transform the path.

P.S. I killed 4 hours to trace this bug.

CommentFileSizeAuthor
i18nmenu-check-normal-path.patch1.42 KBneochief
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jose Reyero’s picture

Looks good, go ahead.

neochief’s picture

Status: Needs review » Fixed

Commited, thanks.

Status: Fixed » Closed (fixed)

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