When installing from drush.

Undefined index: fields field.info.inc:596 [13.26 sec, 75.4 MB]
Invalid argument supplied for foreach() field.info.inc:596 [13.26 sec, 75.4 MB] 

$info['fields'] is NULL.

If I remove "field_info_cache_clear();" from "field_features_rebuild" it will work.

It seems to me that #1574716: Avoid unnecessary cache rebuilds when creating and updating fields did this, and the patch in #1669720: Regression in features_flush_caches() doesnt fix this either.

Comments

mpotter’s picture

Status: Active » Postponed (maintainer needs more info)

Can you explain a bit more about exactly what you were doing? Was this a fresh install of Features on a new site? Or were you updating the version on a site with existing features? When upgrading a module it's common to need to clear the Drupal cache (drush cc all) for it to work since drush does not automatically clear cache when downloading a new version of any module. Need a way to reproduce this error to do anything with it.

anon’s picture

  • Do a clean install with a custom installation profile that doesnt have any content types or fields in the hook_install(). (or use the minimal profile)
  • After the first install, create your own content type and add some fields.
  • Make a feature of this.
  • Make this feature a dependency in the profiles info file.
  • Reinstall the profile.

When installing with drush, the error will be shown.

When using the default profile, this works because it implements node_add_body_field().

After some more research on this, I now dont think this is a feature bug. Its more a Drupal core bug.
See #1400256: Tests for: $info['fields'], not always set?

alippai’s picture

mpotter’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing this one then. If somebody still thinks this is a Features-specific issue and has a patch to deal with it, feel free to re-open.