I have a content type that uses three taxonomy terms as the title via tokens.
When I create a node the title will show raw token and not the value.
When I re-edit the node and save, the value will be inserted.
Which tokens and how many show raw tokens seems to be totally random.

There are two screenshots.
The first is the nodes initial creation.
The second is after re-saving the node.



JustMagicMaria’s picture

Subscribing. Same issue.

Waen’s picture

I have the same annoying problem!

jfrederick’s picture

Re-saving the node also replaces the tokens for me.

gagoo’s picture

Same problem except that it doesn't replace tokens after re-saving.


muhh’s picture

i can confirm this and add the following: it looks like it happens only with tokens, that are generated with the node, like [node:nid], but not with existing values, like [site:current-user].

phelix’s picture

This is happening to me too. After a edit and save again it displays just fine. Someone please help me figure out whats causing this!!

thoughtcat’s picture

Same problem here :(

Edit: This is a really old issue (years old) although someone has posted some workarounds at http://drupal.org/node/373978#comment-5464000

I fixed this easily using Rules - instructions here: http://drupal.org/node/373978#comment-1654702

Thanks to users dreeds for the instructions and aubjr_drupal for linking to them from his comment at http://drupal.org/node/373978#comment-5464000


caw67’s picture

Assigned:Unassigned» caw67

same problem here. and it is no solution to use rules!! i know it works, but wether i use rules i dont need the automatic_nodetitle module!
and same problem in auto_entitylabel

rlangille’s picture

How about instead of using rules to create a band-aid for an annoying issue, we just use hook_node_insert. The node is fully populated, but not yet committed to the db (even has node id). If you look at the documentation for the hook you'll see that you can do something as simple as the following to resolve the issue...

function auto_nodetitle_node_insert($node){
  if( auto_nodetitle_is_needed($node) ) {

This will change the node title before it's initially committed to the db, since node_save has not yet gone out of scope, but the entire transaction is fully formed.

Patch coming shortly.

rlangille’s picture

rlangille’s picture

Status:Active» Needs review
jfrederick’s picture

jfrederick’s picture

kaidjohnson’s picture

Version:7.x-1.0» 7.x-1.x-dev
new504 bytes

Re-rolled for coding standards. No functional change.


rlangille’s picture

Woops, forgot to run my script to convert the standards. Thanks for the catch! :D