As summarized in [925162-18], let's fix and complete using environment overrides from the settings.php file.

1. A hook_requirements() implementation that shows a warning when there is an environment state mismatch.
2. A warning that links to a confirmation page to run the switch.
3. An environment_enforcement submodule that simply automates this.

CommentFileSizeAuthor
#2 environment.988666.patch4.88 KBGrayside
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Grayside’s picture

Grayside’s picture

Status: Active » Needs review
FileSize
4.88 KB

First stab at this. Does not add a message to every page about a mismatch, but does raise red flag with hook_requirements().

EDIT: Need to switch settings.php extension to hook_environments() to use the variable name "environment_definitions".

Grayside’s picture

Status: Needs review » Fixed

Works for me. Highly irregular, but as part of three issues with broad code impact, it is a blocker on further development. As it matches what has been discussed and agreed upon, committed.

Fixed by http://drupal.org/cvs?commit=460868

Grayside’s picture

environment_force module files failed to commit properly: http://drupal.org/cvs?commit=464824

Status: Fixed » Closed (fixed)

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