When adding an arbitrary dependency on a non-existing module, like so:

dependencies[] = unleashed

you get:

1) plenty of PHP notices on admin/build/modules

2) a new package container with an empty module row that says "This version is incompatible with the 7.0-dev version of Drupal core."

3) an empty "Requires: (disabled)" for the module that requires the non-existing module

Attached patch (by chx) fixes 1) and 2).

However, 3) gets worse: The "Requires: " is not output at all and the module defining the requirement can be enabled.

Lastly, we need tests for this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

This has been partially fixed:

- the notices on admin/config/modules are gone, and the table displayed is correct
- but there is still notices when submitting the module page, and a "You must enable the module to install Color." message is incorrectly displayed

Damien Tournoud’s picture

Status: Needs work » Needs review
FileSize
4.77 KB

This would fix it. There was a bunch of dead code in system_modules_submit() that I removed too. Still needs tests.

Damien Tournoud’s picture

Now with tests!

sun’s picture

Thanks!

Did you forget the test module?

Damien Tournoud’s picture

Doh!

sun’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, thanks!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Nice! That's a pretty clever test. Committed to HEAD.

Status: Fixed » Closed (fixed)

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