Closed (outdated)
Project:
Metatag
Version:
7.x-1.x-dev
Component:
Integration with other module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2017 at 16:22 UTC
Updated:
10 Apr 2026 at 10:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
damienmckennaYou should be able to resolve this by modifying the options of the Token display settings for that content type, please give that a try and let me know if it works.
Comment #3
nithinkolekar commentedmay I was not clear in explaining the problem , so attaching the screen shots
1. body field with token (text format is plain text and allowed to have token replacements)

2. twitter card tag setting for description field

3. node view page where twitter card with raw token

also tried different available token display setting but no success. I think Metatag is generating twitter card from the field's raw value.
Comment #4
nithinkolekar commentedcorrect image
Comment #5
damienmckennaI understand the problem you're seeing. However, the [node:summary] token's value is generated by node.tokens.inc where it is supposed to run all of the text filters that are configured for that field. That's why I suggest going to the Tokens display settings for that content type and make sure the body field is configured correctly. Please let me know. Thanks.
Comment #6
damienmckennaI took a look at Token Insert. Which submodule are you using to do what you want - token_insert_text, token_insert_wysiwyg or token_insert_ckeditor? Looking at token_insert_text it only runs the text processing filters if the user has the "use token insert" permission, whereas neither token_insert_wysiwyg nor token_insert_ckeditor require the permission. I see this as a bug in the Token Insert module. Does the output work correctly if you give the "anonymous user" and "authenticated user" roles the "use token insert" permission?
Comment #7
nithinkolekar commentedAs mentioned in #3 body field 's text format is set to "plain text" and "Replace tokens" option for plain text is enabled( at /admin/config/content/formats/plain_text) which will work for anonymous too. Ckeditor won't be necessary here as Twitter will strip out html tags anyway.
Token insert (text) is required if you need token list while inserting into body field, but if you know the token format "Token insert UI" module is enough to test with site tokens or any other built in tokens like node/user. For above example [site:name] is tested.
I think enabling "Replace tokens" for plain text is the catch here.
Comment #8
aubergine2010 commentedIve the same problem, but the issue is not with token insert module or the related token filter modules. The way the filter module works is, it backtraces the current viewed page and if theres a token, it changes the token with the actual value on the fly.
Metatag module should be doing the same or find any other way to do token_replace if there is any on the body or summary. Which would be a new feature but not a bug fix.
EDIT: Unless this feature is added to metatag, both token insert and token filter modules are actually useless.
Comment #9
damienmckennaI thank you for your contribution to the Metatag module and the Drupal community as a whole. The D7 version of this module is no longer supported, so I am closing this issue.
Comment #11
damienmckenna