Activemenu ajax menus will not work on non-Apache servers. This is because the javascript Drupal.getPath() function assumes the links do not include "index.php" in the path. But on non-Apache servers, the Drupal php function url() in includes/common.inc includes "index.php" in the url.

jstools.js
---------
/**
* Return the Drupal path portion of an href.
*/
Drupal.getPath = function (href) {
href = Drupal.pathPortion(href);
// 3 is the length of the '?q=' added to the url without clean urls.
href = href.substring(Drupal.settings.jstools.basePath.length + (Drupal.settings.jstools.cleanurls ? 0 : 3), href.length);
var chars = ['#', '?', '&'];
for (i in chars) {
if (href.indexOf(chars[i]) > -1) {
href = href.substr(0, href.indexOf(chars[i]));
}
}
return href;
};

Comments

bander2’s picture

I experienced this problem when I migrated my site from linux/apache to windows/iis. Does anyone have a fix?

bander2’s picture

Never mind. I changed the 3 to a 12 and it works!