Problem/Motivation
When the environment_require_override
option is enabled, the Status report page says "You should override the 'environment_override' variable in your settings.php file to indicate the server environment this site is in." regardless of if that variable is set or not.
Steps to reproduce
- Install Drupal with the Environment module.
- Navigate to the settings form at admin/config/system/environment/
- Enable "Require environment override" and click "Save".
- Navigate to the Status report page at admin/reports/status/. It should currently contain the message quoted above under "Environment Override".
- Add
$conf['environment_override'] = 'development';
to settings.php. - Clear cache and refresh the Status report page. It should no longer contain the message from #4, but it does.
This is because environment_requirements()
(environment.install) always gives that message if the option from #3 is enabled.
Proposed resolution
Only give that message within environment_requirements()
when the environment_override
variable is not set in settings.php. When it is, return an OK status message.
Remaining tasks
I'll be attaching a patch that achieves the proposed resolution.
Comment | File | Size | Author |
---|---|---|---|
#2 | environment-inaccurate-override-status-2492203-2.patch | 1.86 KB | arknoll |
Comments
Comment #1
guschilds CreditAttribution: guschilds at Chromatic commentedAttached is a patch that solves the issue described in the issue summary above.
The patch applies directly to the 7.x-1.x branch.
Thanks for your work on this module!
Comment #2
arknoll CreditAttribution: arknoll commented@guschilds thank you very much for the patch. I just made one small change to the patch. Marking RTBC and merging in.
Comment #3
arknoll CreditAttribution: arknoll commentedComment #5
arknoll CreditAttribution: arknoll commented