Problem/Motivation
As path based metatags are entities the field based translation can be used. However, since this entity-type has it's very own language handling using field based translation leads to trouble.
A scenario in which that happens is when a translatable meta field is used in nodes with field based translation enabled.
As soon as you use this translatable field for path based metatags the values of the field are stored with a specific language that may not matches the language selected for path based metatag entity itself.
As soon as the path based metatag entity is load in the frontend this inconsistency between entity and field language leads to missing field values.
Proposed resolution
I think the fastest/easiest fix would be to enforce the field language for path based metatags to LANGUAGE_NONE
.
The attached does exactly this and provides an upgrade path too.
Another solution could be to introduce proper translation support, but I don't think that there would be any benefit.
Remaining tasks
Review of the approach and the code necessary
User interface changes
none
API changes
none
Comment | File | Size | Author |
---|---|---|---|
#1 | metatags_quick-fix-field-translatability-1884110-1.patch | 3.82 KB | das-peter |
metatags_quick-fix-field-translatability.patch | 3.69 KB | das-peter |
Comments
Comment #1
das-peter CreditAttribution: das-peter commentedFixed issues in the update hook.
Comment #2
valthebaldCommitted to 7.x-2.x-dev
Thanks for the bug report and (more important!) solution!