I am working on #412518: Convert taxonomy_node_* related code to use field API + upgrade path, and this little bug appeared today.

The changes in this patch #224482: Please please please analyse this code and tell me where I am going wrong made all of core's field and widget types required. This means they don't appear at admin/build/modules. My work involved a new module that depends on the options module. When options module is required, the admin modules form indicates that "options" is missing. Saving the form disabled my module. I can't enable it again.

I know the workaround. Don't list required modules as dependencies. But is this the desired behavior?

CommentFileSizeAuthor
#9 490400-8.patch2.88 KBjpmckinney
#7 490400-7.patch2.34 KBjpmckinney

Comments

Anonymous’s picture

My link is wrong. I meant to link the changes on this patch #372743: Body and teaser as fields.

Anonymous’s picture

Title: modules which have dependencies that are also required cannot be enabled. » modules with dependencies whose .info file sets required=TRUE cannot be enabled.
dave reid’s picture

So if your module is dependent on a required module, just don't put in as a requirement in the .info file. We don't list:

dependencies[] = user
dependencies[] = node

In all the core sub-modules.

Anonymous’s picture

Like I said: I know the workaround. However, if a contrib module depends on an optional core module that becomes required in a later version, the module may become disabled and could not be re-enabled even though all of the dependencies are enabled. The admin module form says that the module's dependency is missing when in fact it is enabled and required.

In Drupal 6, I can add a core required module as a dependency to another module, and that module can still be enabled and disabled.

webchick’s picture

Issue tags: +DrupalWTF

I ran into this today, and it was a complete WTF:

Only local images are allowed.

The more I think about it, the more I really don't like hiding required modules from this page anyway, though. It really obfuscates how Drupal works. I'm wondering if we should fix this by reverting #293223: Roll back "Hide required core modules".

On the other hand, this likely fails when requiring hidden = TRUE modules as well, which we /do/ want hidden, even when they do exist. So I think there's still a bug here to sniff out.

jpmckinney’s picture

StatusFileSize
new2.34 KB

This patch fixes the bug in the title of this issue. It will also make it such that modules with "required = TRUE" will not appear in the "Requires: !module-list" list.

jpmckinney’s picture

Status: Active » Needs review
jpmckinney’s picture

StatusFileSize
new2.88 KB

Oops, previous patch made it such that "Required by: !module-list" showed modules with "required = TRUE". Fixed.

Anonymous’s picture

I just tested this patch to see the effects. I altered Devel module's info file to add a dependency on node, which is a required module.

BEFORE patch applied:

http://skitch.com/bangpound/n9p7y

AFTER patch applied:

http://skitch.com/bangpound/n9p7j

It looks good to me! But since it's related to deep system stuff, I will defer to others for RTBC.

realityloop’s picture

Status: Needs review » Reviewed & tested by the community

Worked here too

webchick’s picture

Status: Reviewed & tested by the community » Fixed

YAY! It's great to have this bug squashed.

Committed to HEAD! Thanks!

Now if only we can render it unnecessary by backing out the changes at #293223: Roll back "Hide required core modules".. ;)

Status: Fixed » Closed (fixed)
Issue tags: -DrupalWTF

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