I created a module, and in its .info file, put this:
dependencies[] = field
This should be OK. I want my module to depend on the core field.module. Right?
But when I try to enable this module, it tells me I cannot because I don't have Field and Field SQL Storage. See attached screen shot.
Obviously I have both Field and Field SQL Storage enabled. They are required modules and as such are not shown on the page (at least not with current Drupal 7), but they're definitely enabled.
May be related to this issue: #293223: Roll back "Hide required core modules"
Comments
Comment #1
davyvdb commentedWe've never needed to specify dependency on required modules (like node, ...). So I think you can fix this issue by removing the line in your info file.
field.info specifies
dependencies[] = field_sql_storagethough. So maybe for consistency it should be allowed that one can specify dependency on required modules.So I think this should be handled but isn't critical?
Comment #2
jhodgdonI realize that I could fix that issue by removing the line from my info file, and of course I did exactly that.
If we're not going to allow dependencies on required modules, we need to say that somewhere prominitently in the documentation. But I think that is the wrong way to go, because the list of which modules are required, which ones are hidden, and which ones are OK to turn on/off is not always obvious. Just because a module is hidden doesn't mean it's a required module necessarily, as these are controlled by two different flags in the .info file.
Comment #3
JacobSingh commentedHere is a patch which might address it:
Comment #4
JacobSingh commentedComment #5
catchI ran into this on http://drupal.org/node/562694#comment-2778044
Patch is similar to the one I ended up incorporating on that issue, however it exposes another bug, which is that install profiles specify all their modules as dependencies. So if you install core with the standard install profile, suddenly you can't disable comment module because 'standard' depends on it. Not good, but as far as I'm concerned that's also a bug, which has been hidden by this one.
Comment #7
jhodgdonThose look like real test failures from that patch, as they're about settings on the module page I think?
Comment #8
JacobSingh commentedPerhaps something related to this:
I don't know the tests well enough to say...
Comment #9
webchickI'm pretty sure this is a duplicate of #490400: modules with dependencies whose .info file sets required=TRUE cannot be enabled..
Comment #10
webchick