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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sumerian created an issue. See original summary.

vbard’s picture

Updated patch to current dev.

DamienMcKenna’s picture

Status: Active » Needs review
DamienMcKenna’s picture

Status: Needs review » Needs work

This wouldn't work as it would break modules like Taxonomy Revision.

DamienMcKenna’s picture

$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.

vbard’s picture

@DamienMcKenna Thanks, I'll check that out for taxonomy_revision. And than will fix the equals typo in another patch.

evanbarter’s picture

I think this addresses the issue where an entity type may or may not support revisions.

evanbarter’s picture

Status: Needs work » Needs review
evanbarter’s picture

Whoops, you're attempting to adhere to coding standards so I shouldn't be making more work for you.

DamienMcKenna’s picture

Issue tags: +Needs tests

I think it'd be useful to have tests for this, to expand MetatagCoreTermTest to check the values saved.

DamienMcKenna’s picture

Status: Needs review » Needs work
vbard’s picture

#9 worked for me, thanx!