Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I ran into the issue that Redirect doesnt work completely, after short research I found that the failing code was this one:
function redirect_can_redirect() {
/* ... */
elseif (variable_get('site_offline', 0) || defined('MAINTENANCE_MODE')) {
// Do not redirect in offline or maintenance mode.
$can_redirect = FALSE;
}
/* ... */
return $can_redirect;
}
The bug resides in the usage of the site_offline setting which was migrated to maintenance_mode in Drupal 7 (see update.inc).
function update_fix_d7_requirements() {
/* ... */
// Old variable is removed in update for system.module, see
// system_update_7069().
$site_offline = variable_get('site_offline', -1);
if ($site_offline != -1) {
variable_set('maintenance_mode', $site_offline);
}
/* ... */
}
I don't know why but I have site_offline set to 1 in my install which broke redirect module to work, however the rest of the site was unaffected.
Comment | File | Size | Author |
---|---|---|---|
#5 | 1363630-5_site_offline.patch | 547 bytes | wojtha |
#3 | 1363630-3_site_offline.patch | 539 bytes | wojtha |
#1 | 1363630-1_site_offline.patch | 539 bytes | wojtha |
Comments
Comment #1
wojtha CreditAttribution: wojtha commentedComment #3
wojtha CreditAttribution: wojtha commentedComment #5
wojtha CreditAttribution: wojtha commentedComment #6
Dave ReidThanks! Committed to 7.x-1.x.
http://drupalcode.org/project/redirect.git/commit/299295a