I've got the following pattern set up for URL aliases for my Page nodes:

[node:field-taxonomy-course:name]/[node:title]

The "Course" taxonomy field is not a required field, so Pages can be created without a term chosen.

If a term is not chosen, Drupal returns the following warning message when the node is saved (or updated):

User warning: Attempting to perform token replacement for token type term without required data in token_tokens() (line 791 of .../sites/all/modules/token/token.tokens.inc).

Perhaps I should be reporting this in the Token issue queue, but I guessed that this was triggered by a setting I'd made in Pathauto, and by the way Pathauto is asking Token for information...

Comments

huesator’s picture

Same error here.
After I installed the pathauto module with the default options, I get the same error creating any kind of node.
It works good, I mean, the path is the desired one, but it can confuse people who see the warning.
I decided to uninstall the module, but I still have the same error when I create a node, even after cron execution and cache flush...

Any ideas???

dave reid’s picture

Status: Active » Fixed

This was an error message meant to be displayed during tests only - if you upgrade to Token 7.x-1.x-dev it should go away for you.

huesator’s picture

I upgraded the Token module and it is solved.
Thank you Dave!

Status: Fixed » Closed (fixed)

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

Mark Nielsen’s picture

Thanks, Dave, for this information. Much appreciated.