-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#5387 add CiviCRM Maintenance Mode #31893
base: master
Are you sure you want to change the base?
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
376d00d
to
90206f9
Compare
The ternary choice looks like a good balance for dealing with CMS maintenance-mode. 👍 From a type-system POV, using
The ternary choice should have an explicit symbol for all its options (eg (I'm still doing more testing -- just wanted to get that thought out.) |
I was working on the basis that there would be no need to set explicit NULL, ie if you had an env var then anything falsey would be But given setting values are often strings at some level then I see how a special string like Will have a go correcting now. |
@totten did you have any further thoughts? |
Change made (with I think its better though in a way it's kinda just flipped the type-oddness to the PHP side. This was you go But I guess we're PHP developers and Civi setting values are just generally quite softly typed, so maybe good enough? |
Overview
This adds a Maintenance Mode concept to CiviCRM.
It can be explicitly controlled by a CiviCRM setting, or if unset will fallback to checking if CMS maintenance mode is set (though CMS check only implemented for Drupal8 so far).
When Maintenance Mode is activated:
run_in_maintenance_mode
)bypass maintenance mode
permission)Technical Details
The setting
core_maintenance_mode
can have 3 values:It has an env var
CIVICRM_MAINTENANCE_MODE
.Comments
I haven't exposed the setting in the UI. Given this is very much sysadmin functionality, I guess most would be happy to access with env var / cv / $civicrm_setting.
I think it could be good follow up to add to UI specifically for Standalone (for most CMS users, the CMS toggle makes more sense, so shouldn't really need this).