The token browser should only show the appropriate tokens in the token browser, so instead of setting '#token_types' => 'all' it should only list the appropriate entity types.

CommentFileSizeAuthor
#8 metatag-n2650848-8.patch6.71 KBdamienmckenna
#3 Filter_entity_type_tokens_.patch5.7 KBAnonymous (not verified)

Comments

DamienMcKenna created an issue. See original summary.

Anonymous’s picture

The \Drupal\metatag\MetatagToken::tokenBrowser needs $entity_type argument and \Drupal\metatag\Form\MetatagDefaultsForm::form needs to provide this argument when calling for the tree.

Anonymous’s picture

StatusFileSize
new5.7 KB

quick & dirty

damienmckenna’s picture

Status: Active » Needs review
Issue tags: +Needs tests

Thanks for the patch! Don't forget to set the issue status to "needs review" when you upload a patch.

Status: Needs review » Needs work

The last submitted patch, 3: Filter_entity_type_tokens_.patch, failed testing.

The last submitted patch, 3: Filter_entity_type_tokens_.patch, failed testing.

The last submitted patch, 3: Filter_entity_type_tokens_.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new6.71 KB

Rerolled.

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

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