As soon as the metatags module is activated, the 'metatags' property is added to every entity in hook metatag_entity_load().
In Drupal 7 entities are also used for configurations, e.g. taxonomy vocabularies or Entity API configs like Profile2. On such entities the metatags property does not make any sense. Furthermore it makes many features overridden, if you activate the metatags module once the features have already been exported.
Attached patch adds a check in metatag_entity_load() on whether the current entity type supports metatags. Additionally this patch avoids unnecessary metatag_metatags_load_multiple() calls when the entity type can not have metatags anyway.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1841404-metatag_entity_load_check-1.patch | 1.54 KB | mh86 |
metatag_entity_load_check.patch | 764 bytes | mh86 | |
Comments
Comment #1
mh86 CreditAttribution: mh86 commentedSmall follow-up, we should also check that $entity_type['configuration'] is not set or FALSE (this is an Entity API setting). Otherwise the metatag property will still be exported for entities like message types or rules link configurations.
Comment #2
DamienMcKenna(updated the title)
Good catch, committed!
Comment #3
DamienMcKennaVersion 7.x-1.0-beta3 has been released and includes this work. Am closing this issue in an effort to keep the issue queue clean. Thank you all for your continued help!