field.info.inc has not been properly updated after #460320: Standarized, pluggable entity loading (nodes, users, taxonomy, files, comments). At line 153 you can read:

drupal_alter('fieldable_info', $info['fieldable types']);

but hook_fieldable_info() has gone. This prevents any alteration to be actually performed as hook_entity_info_alter() implementations are run in two different context: in entity_get_info() entity info is collected and altered, then it's overridden by _field_info_collate_types() and never altered due to the wrong line above.
A possible fix is just correcting line 153 but probably the entity info should be cached in the same table for both context to avoid possible unwanted overridings.

BTW, this is blocking #539110: TF #4: Translatable fields UI.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plach’s picture

Status: Active » Needs review
FileSize
653 bytes

The easy way.

catch’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Fields in Core, +API change

Ahh, we had a followup in that issue (not done yey), to have _field_info_collate_types() take the information already provided by entity_get_info() - and then add any field API specific stuff to that (which shouldn't require the alter hook to be run at all), but for now let's do it like this.

Status: Reviewed & tested by the community » Needs work

The last submitted patch failed testing.

plach’s picture

Issue tags: +translatable fields

AFAIK field translation tests are currently the only place in core where hook_entity_info_alter() is used. The strange thing is they didn't break before and they did now...

I'll try to fix them ASAP.

plach’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
3.3 KB

This one should fix the tests.

yched’s picture

Agreed as a hotfix.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks!

yched’s picture

Title: hook_entity_info_alter() broken » refactor _field_info_collate_types around entity_get_info()
Status: Fixed » Active

Reopening for followup.

plach’s picture

Issue tags: -translatable fields

The followup should not appear in the TF queue.

catch’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

I'm 99% sure yched fixed this in another issue, but leaving slightly open just in case.

yched’s picture

Status: Postponed (maintainer needs more info) » Fixed

Indeed, fixed in #606994: Move entity handling out of Field API - forgot about that thread.

Status: Fixed » Closed (fixed)
Issue tags: -Fields in Core, -API change

Automatically closed -- issue fixed for 2 weeks with no activity.