So there's an interesting code comment in drupal_system_listing().
The 'profiles' directory contains pristine collections of modules and themes as organized by a distribution. It is pristine in the same way that /modules is pristine for core; users should avoid changing anything there in favor of sites/all or sites/ directories.
In other words, the comments imply that if you want to override a module included in a profile with a newer version, you should put it in sites/all or sites/<config> directories.
However, drupal_system_listing() actually looks for modules in this order: (later searches override earlier searches)
- modules
- sites/all/modules
- profiles/<current-profile>/modules
- <current-config>/modules (like sites/default/modules or sites/org.example/modules)
Which means that modules in sites/all/modules cannot override the older, out-of-date versions of themselves in profiles directory.
Comment | File | Size | Author |
---|---|---|---|
#6 | sites-all-override-480044-6-D6.patch | 1.09 KB | JohnAlbin |
#1 | sites-all-override-480044-1.patch | 1.07 KB | JohnAlbin |
Comments
Comment #1
JohnAlbinSimple patch.
Comment #2
Crell CreditAttribution: Crell commentedThis could probably be backported to D6, too. Subscribing. :-)
Comment #3
catchSimple patch, impossible to write a test for. RTBC.
Comment #4
dman CreditAttribution: dman commented... we'll put that on your tombstone.
;-)
Comment #5
webchickMakes sense. Committed to HEAD.
Interestingly, this doesn't apply to D6:
However, I can see with my own two eyes that it's not fixed there, so I guess this needs a re-roll?
Comment #6
JohnAlbinNew patch for D6.
Comment #7
eabrand CreditAttribution: eabrand commentedJust tested. It works!
Comment #8
eabrand CreditAttribution: eabrand commentedComment #9
Gábor HojtsyAlthough I was a little bit concerned that existing sites possibly depending on this order might break, after much thinking I figured there would probably be a very limited number of sites and they should not hold us back from having a solid core setup supporting distributions, so they can thrive. Committed to Drupal 6!