when using a tokenized email such as the below, i am unable to produce the Node ID regularly in order to create the url of the node created. Sometimes [nid] returns the node ID and sometimes it is just blank.
A new [type-name] was created ([title]) by [author-name] ([site-url][account-url]).
[site-url]/node/[nid]
Comments
Comment #1
mudd commentedI'm struggling with something similar when firing off emails via workflow state transitions.
It appears that when a node is created or updated the token fails -- I get .../node/32
But when I submit I get a clean URL to the node. I've tried both [url] or [link] ("submit" is one of my workflow states -- by default all workflows have state "create", and that's where I'm having trouble). So my tokenized emails work fine from one state to another, except the "created" state. In fact, [link] gives me "[link]" in my email to some role but not to others.
This may be an issue with module weight.
Comment #2
gregglesPathauto runs relatively late in the node creation process, so if you want to get the link your module will have to run after pathauto.
(See the weight in the system table).
Comment #3
dave reidComment #4
dave reidAnswer provided in #2.