drupal_not_found

Versions
4.6 – 7
drupal_not_found()

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

▾ 15 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.
contact_mail_user in modules/contact.module
file_download in includes/file.inc
Call modules to find out if a file is accessible for a given user.
file_transfer in includes/file.inc
Transfer file using http to client. Pipes a file through Drupal to the client.
node_page in modules/node.module
Menu callback; dispatches control to the appropriate operation handler.
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.
queue_view in modules/queue.module
Display a queued node along with voting options for it.
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.
user_view in modules/user.module

Code

includes/common.inc, line 202

<?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);

  $path = drupal_get_normal_path(variable_get('site_404', ''));
  $status = MENU_NOT_FOUND;
  if ($path  && $path != $_GET['q']) {
    menu_set_active_item($path);
    $status = menu_execute_active_handler();
  }

  if ($status != MENU_FOUND) {
    drupal_set_title(t('Page not found'));
    print theme('page', '');
  }
}
?>
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.