drupal_not_found

Versions
4.6 – 7
drupal_not_found()

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

▾ 33 functions call drupal_not_found()

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

Code

includes/common.inc, line 343

<?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);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.