drupal_not_found

Versions
5 – 7
drupal_not_found()

Generates a 404 error if the request can not be handled.

▾ 34 functions call drupal_not_found()

blogapi_blogapi in drupal/modules/blogapi/blogapi.module
blog_page in drupal/modules/blog/blog.module
Menu callback; displays a Drupal page containing recent blog entries.
blog_page_user in drupal/modules/blog/blog.module
Displays a Drupal page containing recent blog entries of a given user.
book_admin_edit in drupal/modules/book/book.module
Display an administrative view of the hierarchy of a book.
book_export in drupal/modules/book/book.module
Menu callback; Generates various representation of a book page with all descendants and prints the requested representation to output.
contact_user_page in drupal/modules/contact/contact.module
Personal contact page.
file_download in drupal/includes/file.inc
file_transfer in drupal/includes/file.inc
Transfer file using http to client. Pipes a file through Drupal to the client.
filter_admin_delete in drupal/modules/filter/filter.module
Menu callback; confirm deletion of a format.
forward_form_submit in contributions/forward/forward.module
locale_admin_manage_delete_form in drupal/modules/locale/locale.module
User interface for the language deletion confirmation screen.
locale_admin_string_delete_page in drupal/modules/locale/locale.module
String deletion confirmation page.
menu_edit_item_form in drupal/modules/menu/menu.module
Present the menu item editing form.
menu_edit_menu_form in drupal/modules/menu/menu.module
Menu callback; handle the adding/editing of a new menu.
menu_item_delete_form in drupal/modules/menu/menu.module
Menu callback; delete a single custom item.
menu_reset_item in drupal/modules/menu/menu.module
Menu callback; reset a single modified item.
node_revisions in drupal/modules/node/node.module
Menu callback for revisions related activities.
poll_cancel in drupal/modules/poll/poll.module
Callback for canceling a vote
poll_results in drupal/modules/poll/poll.module
Callback for the 'results' tab for polls you can vote on
poll_vote in drupal/modules/poll/poll.module
Callback for processing a vote
poll_votes in drupal/modules/poll/poll.module
Callback for the 'votes' tab for polls you can see other votes on
profile_browse in drupal/modules/profile/profile.module
Menu callback; display a list of user information.
profile_field_delete in drupal/modules/profile/profile.module
Menu callback; deletes a field from all user profiles.
profile_field_form in drupal/modules/profile/profile.module
Menu callback: Generate a form to add/edit a user profile field.
statistics_access_log in drupal/modules/statistics/statistics.module
statistics_node_tracker in drupal/modules/statistics/statistics.module
statistics_user_tracker in drupal/modules/statistics/statistics.module
system_main_admin_page in drupal/modules/system/system.module
Provide the administration overview page.
taxonomy_admin_term_edit in drupal/modules/taxonomy/taxonomy.module
Page to edit a vocabulary term.
taxonomy_admin_vocabulary_edit in drupal/modules/taxonomy/taxonomy.module
Page to edit a vocabulary.
taxonomy_overview_terms in drupal/modules/taxonomy/taxonomy.module
Display a tree of all the terms in a vocabulary, with options to edit each one.
taxonomy_term_page in drupal/modules/taxonomy/taxonomy.module
Menu callback; displays all nodes associated with a term.
tracker_track_user in drupal/modules/tracker/tracker.module
Menu callback. Prints a listing of active nodes on the site.
user_view in drupal/modules/user/user.module

Code

drupal/includes/common.inc, line 354

<?php
function drupal_not_found() {
  drupal_set_header('HTTP/1.1 404 Not Found');

  watchdog('page not found', check_plain($_GET['q']), WATCHDOG_WARNING);

  // Keep old path for reference
  if (!isset($_REQUEST['destination'])) {
    $_REQUEST['destination'] = $_GET['q'];
  }

  $path = drupal_get_normal_path(variable_get('site_404', ''));
  if ($path && $path != $_GET['q']) {
    menu_set_active_item($path);
    $return = menu_execute_active_handler();
  }
  else {
    // Redirect to a non-existent menu item to make possible tabs disappear.
    menu_set_active_item('');
  }

  if (empty($return) || $return == MENU_NOT_FOUND || $return == MENU_ACCESS_DENIED) {
    drupal_set_title(t('Page not found'));
    menu_set_active_item('');
    $return = '';
  }
  // To conserve CPU and bandwidth, omit the blocks
  print theme('page', $return, FALSE);
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.