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.
I just freshly installed features-7.x-1.0-rc3, with no features installed or available, and get the following messages on
admin/structure/features:
Notice: Undefined index: feature in features_get_info() (line 625 of ../features.module). Warning: array_keys() expects parameter 1 to be array, null given in features_get_info() (line 625 of ../features.module). Warning: Invalid argument supplied for foreach() in features_get_info() (line 626 of ../features.module). Warning: array_unique() expects parameter 1 to be array, null given in features_get_info() (line 631 of ../features.module). Warning: Invalid argument supplied for foreach() in features_get_info() (line 632 of ../features.module)./features.module).
Fix:
In features.module, line 590, replace
if (empty($cache) || $reset) {
$data = array();
with
if (empty($cache) || $reset) {
$data = array('feature' => array(), 'module' => array());
Otherwise, 'feature' can be left empty.
Comment | File | Size | Author |
---|---|---|---|
#1 | features-1635662-1.patch | 527 bytes | donquixote |
Comments
Comment #1
donquixote CreditAttribution: donquixote commentedPatch.
Note: The 'module' => array() is not really required, but just looks more robust.
Comment #2
szantog CreditAttribution: szantog commentedPatch cannot applied to the latest dev, but the solution is ok, when I applied it manually.
Comment #3
juampynr CreditAttribution: juampynr commented@szantog's comment at #2 is wrong. I could apply the patch cleanly and confirmed that it fixes the issue.
Changing priority to major, as this error will happen to anyone installing features for the first time.
Comment #4
Andi-D CreditAttribution: Andi-D commentedApplied Patch on rc3 and it works
thx
Comment #5
mpotter CreditAttribution: mpotter commentedCommitted and pushed to a77b4d3
Comment #6
IshanComBr CreditAttribution: IshanComBr commentedpatch #1 works for me also
TKS!
Comment #7
joachim CreditAttribution: joachim commentedMight this warrant a new RC release? It's a bit alarming for new users!
Comment #8
caspercash CreditAttribution: caspercash commentedsame here.. patch in #1 works.. and i think it would be better to fix the current RC release with this patch..
Comment #9
langworthy CreditAttribution: langworthy commentedcertainly warrants a new RC release.
Comment #10
sylvain_a CreditAttribution: sylvain_a commentedI support this!
Comment #11
adamelleston CreditAttribution: adamelleston commentedI would support having a new RC
Comment #12
scuba_flyI also support having a new RC with only this fixed if that speeds up releasing this fix in the RC. other fixes can wait I guess?
Comment #13
aggentle CreditAttribution: aggentle commentedConfirming that I've found the same issue with ...rc3 on D7; is this a cosmetic fault or is this a sign that the installed Features is "broken"?
I can live with the error message on install but please let me know if I need to install the patch.
Thanks.
Comment #14
shadcn CreditAttribution: shadcn commented+1 for new RC please.
Comment #15
quantos CreditAttribution: quantos commented+1 for me too. I get nervous when I see those error messages and don't know what they mean!
Comment #16
joachim CreditAttribution: joachim commentedFiled #1697606: make a new release as a critical to hopefully get the attention of maintainers.
Please feel free to follow that one to lend weight to it :)
Comment #17
mpotter CreditAttribution: mpotter commentedPosting here is all you need to do to get attention. Creating separate issues is not the proper way to handle this. A new release is planned for this week.
Comment #18
imp7 CreditAttribution: imp7 commentedThanks mpotter, I can now drush make an error free drupal, features is awesome :)
Comment #20
donquixote CreditAttribution: donquixote commentedThis was a great fix, but:
#2562871: Errors when going to admin/structure/features/<invalid-feature> killed it again :(