When we are migrating a site, we rewrite the settings.php to include

$conf['site_offline'] = 1;

However, I've just discovered that this doesn't do anything on Drupal 7, *at all*.

Apparently it *has* to be maintenance_mode, not site_offline. In other words it's not a backwards-compatible setting between Drupal 7 and Drupal 6.

I don't know if we would call this an Aegir bug - I tested with 'drush vset site_offline 1' as well, and again nothing! I think it's pretty ridiculous Drupal 7 changed this, but I guess we need to either insert both just to be on the safe side, or do some conditional depending on what the version of core is.

Comments

helmo’s picture

Basing it on the used Drupal core version seems the most elegant solution.

The value of drush_drupal_major_version() might have to be added as a var to provisionConfig_drupal_settings::process.

We don't seem to be the first ones bitten by this either: #1363732: Use maintenance_mode instead of site_offline setting

Steven Jones’s picture

Assigned: Unassigned » Steven Jones

Seems like this would be a simple fix to just add the second variable in I reckon.

Steven Jones’s picture

Status: Active » Fixed

Added the simple fix to 6.x-1.x and 6.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

anarcat’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev

  • Commit 67e3522 on dev-drupal-8, 6.x-2.x, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by Steven Jones:
    Issue #1612252 by mig5, Steven Jones: Fixed 'site_offline()' variable...