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

CommentFileSizeAuthor
#4 activemenu-normal-path.patch763 bytesnedjo

Comments

dmjossel’s picture

That 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.

ardas’s picture

I have the same problem in Drupal 5.1

ardas’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev

Here 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.

nedjo’s picture

Assigned: Unassigned » nedjo
Status: Active » Needs review
StatusFileSize
new763 bytes

Here's an attempted fix, pls test and report back.

nedjo’s picture

Status: Needs review » Fixed

The 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.

Anonymous’s picture

Status: Fixed » Closed (fixed)