If I use code in a module to create a node the title does not contain the nid value.

For example, I have set 'Automatically generate the title and hide the title field' - and set the pattern to ST[node:nid].

When I create the node with the admin screen or via the REST interface the title is generated OK. However, when I create the node programatically (with the module http://drupal.org/project/data_export_import) the title is just generated as 'ST'.

Any pointers gratefully received.

Comments

did you get it working ?

Sorry - I've had a look but can't remember currently. If it comes to me I'll put up a reply.

The only thing which comes to mind is possibly saving the node twice to get the title correct.