Token replacement on form for adding node doesnt work (look at attached image), but works on form for editing node.
Please help :)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | flag_new_node_tokens.patch | 2.33 KB | quicksketch |
| #1 | Edit Featured flag - momentumww uk_1256582725462.png | 109.31 KB | harcher |
| token-not-working.jpg | 24.78 KB | harcher |
Comments
Comment #1
harcher commentedAttached is the flags setup page
Comment #2
quicksketchI believe tokens work everywhere except the node-edit page. This is because there isn't yet a $node object to replace tokens on (for example [title] clearly wouldn't work in your screenshot, since there isn't even a title entered into the field yet). However I think it should be able to replace something like [type-name] at least, since the type is known on a node/add/[type] page.
Comment #3
quicksketchI've committed this patch which allows nodes a special exception when replacing tokens. Instead of requiring a NID, the token replacement for nodes is now extended to allow a node-type also. In the case that a node-type is used, a pseudo-node is created for token purposes.
I've ran into this exact same problem a couple times, so I think this exception is worth including.