An oddity I just ran into with D7:

  • New installation of Drupal 7.7 core + many contrib modules
  • Rules (7.x-2.0-rc1) was downloaded.
  • Entities API was not downloaded.
  • Rules was listed as a dependency on the install profile, Entities API was not. Note: Entities API is a dependency for Rules.
  • The install ran fine, it installed all of the other modules & no errors showed up, except that once it tried to bring up install.php?op=finished the Rules module gave an error that one of the Entities API classes could not be loaded, i.e. it wanted the Entities API module but it had not checked for its existence.

Some related issues:

Related search terms:

  • Recursive dependencies
  • Nested dependencies
Files: 
CommentFileSizeAuthor
#9 1253774_module_order_by_dependencies-9.patch5.12 KBhefox
PASSED: [[SimpleTest]]: [MySQL] 55,416 pass(es).
[ View ]
#7 1253774_module_order_by_dependencies-7.patch5.21 KBhefox
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed.
[ View ]
#5 1253774_module_order_by_dependencies-5.patch5.63 KBhefox
FAILED: [[SimpleTest]]: [MySQL] 9,905 pass(es), 607 fail(s), and 6,871 exception(s).
[ View ]

Comments

Issue tags:+needs backport to D7

Fixing tag.

subscribe

Note that Panopoly Core tries to fill this gap:
panopoly_core_install_load_profile() at least includes second level dependencies (nominal, without required versions).
A core patch should probably be more complete going deeper and respecting required versions.

I played with this a bit in 7 due to the simpletest issue #1093420: Recursive module dependencies of installation profile are not enabled in DrupalWebTestCase::setUp. The code for rearranging based on dependency is there in module_enable, so it'd be nice to module_enable and install_profile_info shared a helper function. However, module_enable exists out if a dependency is missing from filesystem and doesn't care about enabled modules, so that will need to be handled. Also, required modules need to be first still as they are never listed as dependency but items do depend on them. (Currently if you give module_enable a list that includes required modules and tell it to include dependencies, it rearranges the required to be after non-required sometimes)

Status:Active» Needs review
StatusFileSize
new5.63 KB
FAILED: [[SimpleTest]]: [MySQL] 9,905 pass(es), 607 fail(s), and 6,871 exception(s).
[ View ]

First stab, creates a function for both module_enable and install_profile_info to use

Status:Needs review» Needs work

The last submitted patch, 1253774_module_order_by_dependencies-5.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new5.21 KB
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed.
[ View ]

During install, cannot use system_rebuild_module_data unlike module_enable, however can use some of it's internal functions to get the same data.. hacky, and reallly don't think that's the correct way to tell it's install time.

<?php
 
global $install_state;
  if (!empty(
$install_state)) {
   
$module_data = _system_rebuild_module_data();
    foreach (
array_keys($module_data) as $module) {
     
$module_data[$module]->status = 0;
    }
   
$module_data = drupal_container()->get('module_handler')->buildModuleDependencies(_system_rebuild_module_data());
  }
  else {
   
$module_data = system_rebuild_module_data();
  }
?>

Status:Needs review» Needs work

The last submitted patch, 1253774_module_order_by_dependencies-7.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new5.12 KB
PASSED: [[SimpleTest]]: [MySQL] 55,416 pass(es).
[ View ]

I guess I could remove that debugging trigger_error....

Title:Dependencies of dependencies are ignored by installation profile.Dependencies of dependencies are ignored by module_enable()
Issue summary:View changes
Issue tags:+DrupalWTF, +DX (Developer Experience), +Needs issue summary update

Changing the title, as this doesn't just affect install profiles.

If you write a test, and give setUp() a list of module, you'd think that ALL the dependencies get enabled, no? Wrong!

Needs a summary update, but I have crashing tests to fix :(