--- pagearray.module 2007-09-25 19:06:58.000000000 -0700 +++ pagearray.module.fixed 2007-11-14 20:23:26.000000000 -0800 @@ -15,6 +15,12 @@ function pagearray_page($path) { global $theme; + // The active trail is static and will be set with the wrong value if + // _menu_get_active_trail() is first called while $_GET['q'] is set to + // the given $path. (This will happen as part of menu_execute_active_handler()). + // We'll make sure it's set here to avoid errors later. + _menu_get_active_trail(); + $path = drupal_get_normal_path($path); $orig_q = $_GET['q']; $_GET['q'] = $path; @@ -25,7 +31,10 @@ // Adpated from index.php. $return = menu_execute_active_handler(); - + + // Set the active item back to the original + menu_set_active_item($orig_q); + // Menu status constants are integers; page content is a string. if (is_int($return)) { $result = array(