update.php no longer sets MAINTENANCE_MODE = 'update'

Created on 2 May 2018, over 6 years ago
Updated 13 February 2023, over 1 year ago

Problem/Motivation

Discovered in the CDN contrib module: #2969048: Core's DbUpdateController does not define MAINTENANCE_MODE, causes CDN module to run even for update.php β†’ .

We still have this in the code base:

define('MAINTENANCE_MODE', 'install');

but not:

define('MAINTENANCE_MODE', 'update');

Yet much code still assumes this:

  if (defined('MAINTENANCE_MODE') && (MAINTENANCE_MODE == 'install' || MAINTENANCE_MODE == 'update')) {

in _drupal_maintenance_theme(). Other examples in:
error_displayable()
user_role_permissions()

#2288665: Remove _maintenance request attribute and replace it with a maintenance mode service β†’ did not actually address this use case, nor does the https://www.drupal.org/node/2020005 β†’ CR cover it.

Only authorize.php still sets it.

Proposed resolution

Fix it.

Remaining tasks

TBD

User interface changes

None.

API changes

None.

Data model changes

πŸ› Bug report
Status

Closed: works as designed

Version

10.1 ✨

Component
Database updateΒ  β†’

Last updated 9 days ago

No maintainer
Created by

πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024