Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#5 | 375352-missing-modules.patch | 8.16 KB | Damien Tournoud |
#3 | 375352-missing-modules.patch | 7.13 KB | Damien Tournoud |
#2 | 375352-missing-modules.patch | 4.77 KB | Damien Tournoud |
drupal7-sun.required-modules.patch | 638 bytes | sun | |
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedThis 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
Comment #2
Damien Tournoud CreditAttribution: Damien Tournoud commentedThis would fix it. There was a bunch of dead code in system_modules_submit() that I removed too. Still needs tests.
Comment #3
Damien Tournoud CreditAttribution: Damien Tournoud commentedNow with tests!
Comment #4
sunThanks!
Did you forget the test module?
Comment #5
Damien Tournoud CreditAttribution: Damien Tournoud commentedDoh!
Comment #6
sunLooks good, thanks!
Comment #7
webchickNice! That's a pretty clever test. Committed to HEAD.