i have development, staging, and production environments for my site. the "staging" environment is defined by my custom module code. i have the environment_force module enabled. a typical use case is to load a copy of the production db data into the staging db. i have

$conf['environment_override'] = 'staging';

in the staging site's settings.php file. when i try to do anything in drush - status, env, anything - all i get is

The current environment is overriden with 'staging'

and it stops there.

i had to change that drupal_set_message() call in environment.module from 'error' to 'notice' to be able to move forward.

what it was reacting to was that the environment value from the db was "production", and it needed to switch to "staging". but it couldn't get through the bootstrap process to even begin.

if i try changing the environment_switch() call in environment_force_init() to set the $force parameter to TRUE, it causes serious trouble, because it's trying to do the switch process (enabling/disabling modules, etc.) before bootstrap is complete.

there should be a way for the system to move on past the environment_switch() call, even if it fails.

Comments

arknoll’s picture

Issue summary: View changes

See a similar issue for 7.x branch. https://drupal.org/node/2200863

arknoll’s picture