function _menu_find_router_path


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 _menu_find_router_path($link_path)
cle7 _menu_find_router_path($link_path)
elmsmedia7 _menu_find_router_path($link_path)
icor7 _menu_find_router_path($link_path)
meedjum_blog7 _menu_find_router_path($link_path)
mooc7 _menu_find_router_path($link_path)

Finds the router path which will serve this path.


$link_path: The path for we are looking up its router path.

Return value

A path from $menu keys or empty if $link_path points to a nonexisting place.

Related topics

2 calls to _menu_find_router_path()
menu_link_save in includes/
Saves a menu link.
_menu_navigation_links_rebuild in includes/
Builds menu links for the items in the menu router.


includes/, line 3347
API for the Drupal menu system.


function _menu_find_router_path($link_path) {
  // $menu will only have data during a menu rebuild.
  $menu = _menu_router_cache();

  $router_path = $link_path;
  $parts = explode('/', $link_path, MENU_MAX_PARTS);
  $ancestors = menu_get_ancestors($parts);

  if (empty($menu)) {
    // Not during a menu rebuild, so look up in the database.
    $router_path = (string) db_select('menu_router')->fields('menu_router', array('path'))->condition('path', $ancestors, 'IN')->orderBy('fit', 'DESC')->range(0, 1)->execute()->fetchField();
  elseif (!isset($menu[$router_path])) {
    // Add an empty router path as a fallback.
    $ancestors[] = '';
    foreach ($ancestors as $key => $router_path) {
      if (isset($menu[$router_path])) {
        // Exit the loop leaving $router_path as the first match.
    // If we did not find the path, $router_path will be the empty string
    // at the end of $ancestors.
  return $router_path;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.