function _menu_site_is_offline


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_site_is_offline($check_only = FALSE)
cle7 _menu_site_is_offline($check_only = FALSE)
elmsmedia7 _menu_site_is_offline($check_only = FALSE)
icor7 _menu_site_is_offline($check_only = FALSE)
meedjum_blog7 _menu_site_is_offline($check_only = FALSE)
mooc7 _menu_site_is_offline($check_only = FALSE)

Checks whether the site is in maintenance mode.

This function will log the current user out and redirect to front page if the current user has no 'access site in maintenance mode' permission.


$check_only: If this is set to TRUE, the function will perform the access checks and return the site offline status, but not log the user out or display any messages.

Return value

FALSE if the site is not in maintenance mode, the user login page is displayed, or the user has the 'access site in maintenance mode' permission. TRUE for anonymous users not being on the login page when the site is in maintenance mode.

Related topics

2 calls to _menu_site_is_offline()
menu_execute_active_handler in includes/
Execute the page callback associated with the current path.
menu_get_custom_theme in includes/
Gets the custom theme for the current page, if there is one.


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


function _menu_site_is_offline($check_only = FALSE) {
  // Check if site is in maintenance mode.
  if (variable_get('maintenance_mode', 0)) {
    if (user_access('access site in maintenance mode')) {
      // Ensure that the maintenance mode message is displayed only once
      // (allowing for page redirects) and specifically suppress its display on
      // the maintenance mode settings page.
      if (!$check_only && $_GET['q'] != 'admin/config/development/maintenance') {
        if (user_access('administer site configuration')) {
          drupal_set_message(t('Operating in maintenance mode. <a href="@url">Go online.</a>', array('@url' => url('admin/config/development/maintenance'))), 'status', FALSE);
        else {
          drupal_set_message(t('Operating in maintenance mode.'), 'status', FALSE);
    else {
      return TRUE;
  return FALSE;



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.