Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Sep 2008 at 16:25 UTC
Updated:
2 Jul 2009 at 19:07 UTC
Some modules don't just depend on other modules, but also need to have a higher weight to be sure they can override those other modules. I propose a new property for info files to tell Drupal to give a module a higher weight than the modules defined with this new property.
name = Foo
description = "Bar."
core = 6.x
dependencies[] = taxonomy
dependencies[] = comment
weight[] = taxonomy
weight would be the new property. In this case module Foo should get a higher weight than taxonomy.module.
Comments
Comment #1
dave reidAs dicussed in #drupal, this would probably better implemented with using #253569: DX: Add hook_modules to act on other module status changes. If your module needs to set a weight higher or lower an a module, your module should implement:
Yes it's a little bit more work on the part of the module maintainer, but this solution is easier to implement into core. You can also end up with possible weight conflicts and having to reorder all the weights of the system table.
This is an interesting proposal and I'll look into it.
Comment #2
xanoI came up with this version before dinner. It doesn't apply anymore because it doesn't take conflicting weights into account, but I didn't want to keep it from you.
This would give foo.module a weight higher than any other module's, but lower than taxonomy's.
Comment #3
dave reidMarking as a duplicate of #127641: Module weight in .info