Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently Metatag stores its data as $entity->metatag[metatag_name], as compared to core data that is stored as e.g. $entity->field_name[langcode][0][value]; Metatag should be updated to store its data in the same way as other data structures to make some types of data handling easier, including translations.
Comment | File | Size | Author |
---|---|---|---|
#3 | metatag-n1876034-3.patch | 809 bytes | DamienMcKenna |
Comments
Comment #1
Jax CreditAttribution: Jax commentedJust some more info related to this, in
metatag_metatags_save()
:But the issue wasn't with Workbench moderation. It was metatag that cannot save its own loaded data. If you do
node_save(node_load($nid));
your metatags are broken with the current beta version. The beta version assumed your node was saved after a submit. The isset check solves this.Comment #2
Dave ReidThe issue isn't we need to match core strucutre, because it isn't a field at all. The issue is just that we need to be consistent.
Comment #3
DamienMcKennaIn that case it should work fine as-is, so the comment just needs fixing.
Comment #4
Jax CreditAttribution: Jax commentedOk, that comment is more fair. :)
Comment #5
DamienMcKennaPer #2015027: views bulk operation (publish content) destroys metatags of entity translated nodes, this needs work.
Comment #6
DamienMcKennatests node_save()...
Ermahgerd, this is so berken. :-(
Comment #7
DamienMcKennaThis is at least partly related to #2020565: Records for nodes have the wrong language value during initial creation.
Comment #8
DamienMcKennaCould everyone please test the patch at #2020565 and let me know if that fixes the problem, at least for new nodes created after the patch is applied? FYI a key problem appears to be that the original language value may have been saved incorrectly. Argh.
Comment #9
DamienMcKennaAfter some testing I identified that #2020565: Records for nodes have the wrong language value during initial creation did indeed resolve the problem, so I've committed this message to explain that the problem wasn't because of Workbench Moderation.