for multi-language sites, when calling the menu.get method, a language argument is needed for looking up the path_alias (is optional by default and for single language sites)

cfr. http://api.drupal.org/api/function/drupal_get_path_alias/6

patch in attachment adds the language argument

Comments

g10’s picture

hmm, forgot the patch in question

Status: Needs review » Needs work

The last submitted patch, language_arg.menu_service.services.module.6.x.2.0.patch, failed testing.

g10’s picture

another go
(sorry for the mess)

g10’s picture

Status: Needs work » Needs review
gdd’s picture

Status: Needs review » Fixed

Nice patch, with docs even! Committed, thanks.

Status: Fixed » Closed (fixed)

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

longwave’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
Category: feature » bug
Status: Closed (fixed) » Needs review
StatusFileSize
new1.07 KB

Reopening, as this feature does not work as expected when language-specific menu items are used; it only affects returned path aliases, any other item data is returned for the primary site language only.

The attached patch resets the current language before the call to menu_tree_all_data() so language-specific items will be returned correctly. Similar code was added to the node.save service in #956848: Saving a node with nodereference on a multilingual site gives 'this post can't be referenced' error

kylebrowning’s picture

Status: Needs review » Closed (fixed)