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.
The issue happens when you for example want to revert some taxonomy terms metatag values to default template values.
Terms doesn't have revision id, as they does not have revisions.
Here is a patch.
Comment | File | Size | Author |
---|---|---|---|
#9 | metatag-2823544-9.diff | 1.59 KB | evanbarter |
#7 | metatag-2823544-7.diff | 1.59 KB | evanbarter |
| |||
#2 | metatag-2823544-2.diff | 1.11 KB | vbard |
metatag-metatag_metatags_load-taxonomy-term-1.diff | 664 bytes | vbard | |
Comments
Comment #2
vbard CreditAttribution: vbard as a volunteer commentedUpdated patch to current dev.
Comment #3
DamienMcKennaComment #4
DamienMcKennaThis wouldn't work as it would break modules like Taxonomy Revision.
Comment #5
DamienMcKenna$entity_type = 'taxonomy_term'
Also, this doesn't evaluate the string, it assigns the string the value "taxonomy_term", you need two equals signs to do a comparison.
Comment #6
vbard CreditAttribution: vbard as a volunteer commented@DamienMcKenna Thanks, I'll check that out for taxonomy_revision. And than will fix the equals typo in another patch.
Comment #7
evanbarter CreditAttribution: evanbarter commentedI think this addresses the issue where an entity type may or may not support revisions.
Comment #8
evanbarter CreditAttribution: evanbarter commentedComment #9
evanbarter CreditAttribution: evanbarter commentedWhoops, you're attempting to adhere to coding standards so I shouldn't be making more work for you.
Comment #10
DamienMcKennaI think it'd be useful to have tests for this, to expand MetatagCoreTermTest to check the values saved.
Comment #11
DamienMcKennaComment #12
vbard CreditAttribution: vbard as a volunteer commented#9 worked for me, thanx!