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.
Comment | File | Size | Author |
---|---|---|---|
#5 | entity_info-563742-5.patch | 3.3 KB | plach |
#1 | entity_info-563742-1.patch | 653 bytes | plach |
Comments
Comment #1
plachThe easy way.
Comment #2
catchAhh, 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.
Comment #4
plachAFAIK 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.
Comment #5
plachThis one should fix the tests.
Comment #6
yched CreditAttribution: yched commentedAgreed as a hotfix.
Comment #7
Dries CreditAttribution: Dries commentedCommitted. Thanks!
Comment #8
yched CreditAttribution: yched commentedReopening for followup.
Comment #9
plachThe followup should not appear in the TF queue.
Comment #10
catchI'm 99% sure yched fixed this in another issue, but leaving slightly open just in case.
Comment #11
yched CreditAttribution: yched commentedIndeed, fixed in #606994: Move entity handling out of Field API - forgot about that thread.