Hello!
Problem: Activemenu doesn't work with i18n - module enabled.
Symptoms: When I try to open submenus it shortly shows "loading" but the submenu won't open.
I tracked down the problem to the function "activemenu_js()" in file "activemenu.module" . The problem is that if $path - variable is translated (f.ex "en/carto")
$pid = $menu['path index'][$path];
returns nothing. My hack to the problem is:
if (module_exist('i18n')) {
$path = i18n_get_normal_path($path);
}
$pid = $menu['path index'][$path];
...
but I don't know if that is the Drupal-way to do the thing.
I tested with: Drupal 4.7.4, JSTools (11/11/2006), WinXp IE6 and Firefox 1.5
Comments
Comment #1
dmjossel commentedThat allows the menu collapsing to work, but when you click to load an unexpanded menu that hadn't been loaded when the page is loaded, it loads the menu terms for the default language, not the current language.
Comment #2
ardas commentedI have the same problem in Drupal 5.1
Comment #3
ardas commentedHere is the description of the bug I have in FireFox.
jquery.js (line 2)
POST http://localhost/project/activemenu/menu (484ms)
arg has no properties
e([null])jquery.js (line 2)
e([null], true, 1, function())jquery.js (line 2)
e()jquery.js (line 2)
success(Object status=true)activemenu.js (line 54)
e(undefined)jquery.js (line 2)
[Break on this error] eval(function(p,a,c,k,e,d){e=function(c){return(c
Hope this will help you to understand the reason.
Comment #4
nedjoHere's an attempted fix, pls test and report back.
Comment #5
nedjoThe issue turns out to be partly in i18n. I've posted a patch there, http://drupal.org/node/126369. I've applied the activemenu patch. activemenu works with both patches applied. Marking this fixed--the remaining issue is in i18n.mdoule.
Comment #6
(not verified) commented