Hello,
Thanks for this module, it's been really useful and keeps my menu structure clean :)
I've created a context and assigned it via menu path, and everything works great in English (the default language). When switching languages though, the context doesn't get set.
Looking through the code in class i18nmenu_node_context_condition::execute() my menu items will never pass those checks. Printing out an $item here gives me an array like
$item = array(
'title' => 'Filme finden',
'href' => 'movies/find-movies',
'localized_options' => array(),
);
so the line $value = $item['link_path']; always sets $value to NULL, and i18nmenu_node_enabled($item) always returns FALSE because $item['options']['translations'] is not set here.
When viewing the same page in English, the menu item looks like this:
$item = array(
'title' => 'Find Movies',
'href' => 'node/735',
'localized_options' => array(),
);
This works fine for setting context, since node/735 is on the list of urls to activate this context for. The German node id is 1368.
Any ideas?
Comments
Comment #1
plachThe behavior you are describing is really weird. IMO you should try to find out who's setting the active trail and how, as it seems
menu_get_active_trail()is returning incomplete menu items. Moreover in the first case the item's href has a path alias, but menu items are always saved with the internal path.Are you using any module that could interfere with/alter the menu trail?
Comment #2
plachComment #3
andreij commentedSame here.
How should the complete menu item looks like?
Comment #4
plach