1

I have a drupal 7 site, any time I use a token with taxonomy term in it, I am getting the error,

The Default path pattern for Product (applies to all Product content types with blank patterns below) is using the following invalid tokens: [term:name].

for example [term:name] or [term:description]

1

Look at http://drupalcontrib.org/api/drupal/contributions!token!token.module/function/token_element_validate/7. Implement hook_form_alter() of form you are trying to submit and look for #element_validate array key, in field you get an error should be

  '#element_validate' => array('token_element_validate'),

Then you should check #token_types key value. It can have any value, as examples:

 '#token_types' => array('node'),

OR

 '#token_types' => array('all'),

In my case I got similar error in metatag_context module when I was trying to save taxonomy token into metatags context field. Problem was in '#token_types', they was empty, I added array('all') value and form works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.