i18nmenu_localize_tree() does not recurse into such subtrees (i18nmenu_localize_tree($tree[$index]['below'], $update);) where the parent tree is not customized.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Aron Novak’s picture

Status: Active » Needs review
pbuyle’s picture

FileSize
2.07 KB

I've two issues regarding subtree localization:

  1. The subtree below a non-customized item is not localized.
  2. The subtree below an item with a langcode is not localized.

Given the following menu structure

  • Menu item provided by a views, not customized, no langcode
    • Custom menu item with langcode=en
      • Custom menu item with no langcode

With a stock i18n 6.x-1.x, the second and third levels menu item are not localized because because they are below a not customized item provide by Views. With the original patch, the second menu item is localized (meaning it is hidden for non-English language), but the third one isn't.

Or course, I well build menu shouldn't have an item with a language different than its parent's one. But it doesn't help to have such cases not localized. Because these cases are not localized, a site administrator may build an inconsistant menu. If the subtree were properly localized, the error would be easier to spot.

Here is a another patch that solve both issues.

Pol’s picture

We are using this patch and it's working successfully ;-)

Thanks @mongolito404

marinex’s picture

Hi I would like to know whether 3th. patch at "sub-menu items not localized" has better solution of check value? Because there is sentence "there are times where 'below' is NULL rather than FALSE"...
Thanks for help M.

Status: Needs review » Needs work

The last submitted patch, i18n-966534-2.patch, failed testing.

das-peter’s picture

joseph.olstad’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)