When a node is initially created, it uses entity_language() to try to identify the node's language. However, during node creation this returns a NULL value rather than the node's correct language value.

CommentFileSizeAuthor
#1 metatag-n2020565-1.patch1.36 KBdamienmckenna

Comments

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new1.36 KB

This resolves the problem so that the correct language value is saved.

damienmckenna’s picture

This may require updating the language values for all nodes. Again. Argh.

giorgosk’s picture

Here is how to reproduce what Damien says

site with 2 languages en/de
my setup is entity translated content type page
go to en/node/add/page
thus interface is in English

fill in title in german
choose language german
put meta tags in german language
save

metatags table contains a new entry with the new node's id but language UND
and if you reedit the node there appears to be no metatags (but the default)

Just out of curiocity if I manually change the language in metatags table
then metatags appear when I edit the node in that language

After applying the patch all works as it should be

giorgosk’s picture

Status: Needs review » Reviewed & tested by the community

to get @damien

damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks for the review, GiorgosK.

Status: Fixed » Closed (fixed)

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