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.
Attached patch fixes that.
Comment | File | Size | Author |
---|---|---|---|
#14 | 939254_features_pipe_alter_module_name.patch | 1.35 KB | hefox |
#11 | 939254_features_pipe_alter_module_name.patch | 1.35 KB | hefox |
#6 | features_pipe_omponent_alter-939254-5.patch | 768 bytes | hefox |
#5 | features_pipe_omponent_alter-939254-4.patch | 671 bytes | hefox |
#4 | features_pipe_omponent_alter-939254-3.patch | 1.62 KB | hefox |
Comments
Comment #1
apadernoThe patch does what it should do.
Comment #2
irakli CreditAttribution: irakli commentedSorry for my ignorance, but can you please explain?
Features documentation (as described in features.api.php) declares the hook as:
so, there is no $module_name argument there.
Also signature of drupal_alter() is:
while the patch suggests a fifth argument: $module_name.
Why?
Thank you.
Comment #3
fagoStrange, I cannot find it in the docs any more. Anyway, as said drupal_alter() won't support it either.
Comment #4
hefox CreditAttribution: hefox commentedRe-opening.
$module name existed in the d6 branch but was removed (without documentation that it was removed for d6) and there's no way to get that information, breaking any site using it (and I am using it).
It was removed via http://drupalcode.org/project/features.git/commit/af211d123d7048d8daee4a... because drupal_alter only supports 3 arguments.
then it was backported via cb72c5121251a950ad82008267e65740faface83, but drupal_alter supports any number of arguments so there was no reason to backport it other than to keep code consistant, as far as I can tell. (the commit message references wrong ticket number so can't find the issue that backported it).
So... can we just put back $module_name for d6 and add module_name to third argument (whichever way is preferable) to d7? Cause yea, when doing custom ****, that is really useful information.
Comment #5
hefox CreditAttribution: hefox commentedPatch to features root, oops.
Comment #6
hefox CreditAttribution: hefox commentedActually this may be a better idea.
Comment #7
bleen CreditAttribution: bleen commentedsubscribe
Comment #8
Dave ReidNote that this will cross paths with #1300780: Provide an actual hook_features_pipe_alter() for general altering.
Comment #9
bleen CreditAttribution: bleen commentedNote: Hefox is relying on this issue being fixed and backported to 6.x in order to resolve #792472: Implement node type -> strongarm pipe for Features
Comment #10
hefox CreditAttribution: hefox commentedUnfortunately, strongarm had the 'fix' committed already, without knowledge/reference of this or the other issue.
Comment #11
hefox CreditAttribution: hefox commentedUpdating 7.x patch
Comment #12
tim.plunkettLooks okay to me. I guess the D6 version has to wait on #1300780-7: Provide an actual hook_features_pipe_alter() for general altering. again.
Comment #13
tim.plunkettOoops, should have double checked.
$component should be $module_name
Comment #14
hefox CreditAttribution: hefox commented(Copy and paste oops sneaked into the reroll)
Comment #15
tim.plunkettThis is actually RTBC now.
Comment #16
mpotter CreditAttribution: mpotter commentedCommited a1a2ab4.