Closed argiepiano closed 1 year ago
PR provided #113
Rather than porting that missing function, a couple of lines of code can take care of this. The missing function basically looked up the token name for a given entity type (e.g. "term" for "taxonomy_term"). That can be done with entity_get_info and a conditional assignment.
Super, thanks @argiepiano! I merged https://github.com/backdrop-contrib/metatag/pull/113 into 1.x-1.x.
Try the following in Devel:
And you'll get the following:
Error: Call to undefined function token_get_entity_mapping() in metatag_token_generate_array() (line 143 of /Users/XXX/Sites/localhost/XXX/modules/metatag/metatag.tokens.inc).
This happens with ANY token of type metatag.
Token replacements for metatag token types don't work at all. I realize that the
metatag
token type is probably not very common (it's not used to place the meta tags in the head section of the page). However, there are some legitimate use cases, for example, outputting the value of specific tags for informational purposes.The problem here is that there is no replacement for function
token_get_entity_mapping()
in Backdrop.