If you create an optional nodereference field for a node, and then attempt to retrieve the tokens for that node, all of the token values for the nodereference will be empty except for the path and url tokens, which will return "node" and "http://example.com/node" respectively. Those tokens should reflect the state of the referenced node. The attached patch fixes the token code to return an empty string for empty referenced nodes.

CommentFileSizeAuthor
cck_nodereference_token.patch944 bytesduellj
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

Status: Needs review » Fixed

Sounds reasonable. Committed (+ added similar check for userref tokens). Thanks !

Status: Fixed » Closed (fixed)

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