Great module, thank you. I have enabled this module and created a field on vocabulary terms for videos on store categories. I have noticed that in my Drupal Status Report it displays :
Tokens Problems detected
The following token types are not defined but have tokens:
$info['types']['taxonomy_term']
Printing the array:
$token_info = token_info();
print "<pre>";
print_r( $token_info['tokens']['taxonomy_term'] );
print "</pre>";
Result:
Array
(
[field_youtube_video] => Array
(
[name] => YouTube Video: Default
[description] => The YouTube video field value's Default (or Token if exists) view mode output.
)
[field_youtube_video__youtube_video_url] => Array
(
[name] => YouTube Video: Video URL
[description] => The YouTube video field value's youtube.com URL.
)
[field_youtube_video__youtube_image_url] => Array
(
[name] => YouTube Video: Image URL
[description] => The YouTube video field value's local image URL.
)
)
It seems perhaps something has gone amiss because I've added the field to a term instead of a content type, but I have no idea what is causing this. What I have read from others with this type of error indicates that it should be 'term' and not 'taxonomy_term'. Any ideas? (I'm not using Drupal Commons, where this was a bug.)
Comments
Comment #2
guschilds commentedYou were right about
taxonomy_termvs.term. The module makes an attempt to dynamically create tokens for a YouTube field, regardless of what entity type the field is on. This problem arises because the taxonomy term token type isterminstead of matching the entity type's machine name,taxonomy_term. I've attached a "temporary fix" patch that will make the message go away, but unfortunately the tokens will still not work on taxonomy terms (or any non-node entity type for that matter). Oddly enough even though the module dynamically creates tokens inyoutube_token_info_alter(), the replacement code inyoutube_tokens()only works with nodes. I need to come back to this when I have more time and fix that. If anyone would like to give it a shot and supply a patch before I can, it would be more than welcome!