drupal_not_found

Versions
4.6 – 7
drupal_not_found()

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

▾ 27 functions call drupal_not_found()

blogapi_blogapi in modules/blogapi.module
blog_page_user in modules/blog.module
Displays a Drupal page containing recent blog entries of a given user.
book_admin_edit in modules/book.module
Display an administrative view of the hierarchy of a book.
book_export in modules/book.module
Menu callback; Generates various representation of a book page with all descendants and prints the requested representation to output.
contact_mail_user in modules/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.module
Menu callback; confirm deletion of a format.
locale_admin_manage_delete_form in modules/locale.module
User interface for the language deletion confirmation screen.
locale_admin_string_delete in modules/locale.module
Delete a string.
menu_edit_item_form in modules/menu.module
Present the menu item editing form.
menu_edit_menu_form in modules/menu.module
Menu callback; handle the adding/editing of a new menu.
menu_item_delete_form in modules/menu.module
Menu callback; delete a single custom item.
menu_reset_item in modules/menu.module
Menu callback; reset a single modified item.
node_page in modules/node.module
Menu callback; dispatches control to the appropriate operation handler.
node_revisions in modules/node.module
Menu callback for revisions related activities.
poll_results in modules/poll.module
Callback for the 'results' tab for polls you can vote on
poll_vote in modules/poll.module
Callback for processing a vote
profile_browse in modules/profile.module
Menu callback; display a list of user information.
profile_field_delete in modules/profile.module
Menu callback; deletes a field from all user profiles.
profile_field_form in modules/profile.module
Menu callback: Generate a form to add/edit a user profile field.
statistics_access_log in modules/statistics.module
statistics_node_tracker in modules/statistics.module
statistics_user_tracker in modules/statistics.module
taxonomy_term_page in modules/taxonomy.module
Menu callback; displays all nodes associated with a term.
tracker_track_user in modules/tracker.module
Menu callback. Prints a listing of active nodes on the site.
user_view in modules/user.module

Code

includes/common.inc, line 285

<?php
function drupal_not_found() {
  drupal_set_header('HTTP/1.0 404 Not Found');
  watchdog('page not found', t('%page not found.', array('%page' => theme('placeholder', $_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)) {
    drupal_set_title(t('Page not found'));
  }
  print theme('page', $return);
}
?>
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.