You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On drush 7.0.0 and drupal 7 I have a module A with a hook_update_N() enabling a module B. Both enabling module B and running the rest of the updates are crucial for the further operation of module A so I created a hook_requirements checking if module B can be enabled (i.e. the module_enable() returns FALSE or not). However, running 'drush updb' ignores hook_requirements(). (Running updates from a browser does not.)
The problem is that update_check_requirements() in commands/core/drupal/update_7.inc explicitly states:
// Check the system module and update.php requirements only.
Is this by design? If so, what is the recommended way to run such updates with drush?
The text was updated successfully, but these errors were encountered:
I'm using drush 6.3.0 and have the above issue and another related issue.
drush updatedb does not call hook_requirements the way that executing update.php via the UI does. update.php prevents the update in the presence of errors of severity REQUIREMENT_ERROR.
drush updatedb further does not enable dependent modules declared in the modules.info file. The update.php script does.
Steps to reproduce:
Install and enable webform 7.x-3.x. Ensure that views is NOT installed.
Install the code base for webform 7.x-4.x.
Run drush updatedb. Note that views is NOT installed and enabled.
Repeat with update.php. The .info file is sufficient to cause update.php to install and enable views.
If I create a requirement for views in hook_requirements, then update.php will refuse to run at step 3. drush updatedb will however execute the updates, ignoring hook_requirements.
On drush 7.0.0 and drupal 7 I have a module A with a hook_update_N() enabling a module B. Both enabling module B and running the rest of the updates are crucial for the further operation of module A so I created a hook_requirements checking if module B can be enabled (i.e. the module_enable() returns FALSE or not). However, running 'drush updb' ignores hook_requirements(). (Running updates from a browser does not.)
The problem is that update_check_requirements() in commands/core/drupal/update_7.inc explicitly states:
// Check the system module and update.php requirements only.
Is this by design? If so, what is the recommended way to run such updates with drush?
The text was updated successfully, but these errors were encountered: