When I install a module that depends on a second module, and the second module isn't installed, the checkboxes on admin/build/modules are messed up.

For example, install civicrm_theme (the 6.x version), but don't install civicrm (which I don't think has been upgraded yet). At the bottom (after the table), I see "Required by: CiviCRM Theme (disabled)" and then a checkbox. It looks like the dependency code is trying to add this to the CiviCRM module, but since I didn't download CiviCRM, it doesn't exist in the list.

Also related, the depending module (in this case CiviCRM Theme) should be disabled, and it's not.

I'm also getting this warning, which may be related:

warning: Invalid argument supplied for foreach() in /home/doug/workspace/drupal-6rc1/modules/system/system.admin.inc on line 578.

Comments

greggles’s picture

I can confirm this behavior. In 5.x if a module depended on another module and that other module was not present (CiviCRM from Doug's example) then the civicrm_theme module's checkbox would be disabled. I just tested a month-old Drupal6 installation that I have and the checkbox was disabled which prevents this situation from happening. So, this was a regression from within the last month or so.

The version of system.admin.inc that works is 1.35 so the regression happened somewhere after that.

greggles’s picture

In reviewing the core queue, I found http://drupal.org/node/194010 which seems to fix this behavior this problem.

I'm not sure we should close this issue (#203629) just yet since the problem you found here is not the thrust of that other issue and may get overlooked in the final patch, but at least we know some code that does potentially fix this issue.

starbow’s picture

Yep, this is a duplicate, but it is getting totally ignored over there, so maybe it is best to have it here again.
The patch is here: http://drupal.org/files/issues/missing_modules.patch

greggles’s picture

Status: Active » Closed (duplicate)

Then we should just close this as a duplicate. It's now got both of our attention and I'm sure it won't just be ignored in the end. People are kinda distracted now and all ;)