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

tejaspmehta’s picture

did you get it working ?

bailey86’s picture

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.

jgsantos’s picture

Issue summary: View changes

I am having the same problem. If I find a solution I'll post here.

anmolgoyal74’s picture

Status: Active » Needs review
gaurav.kapoor’s picture

Status: Needs review » Closed (outdated)