Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
tejaspmehta CreditAttribution: tejaspmehta commenteddid you get it working ?
Comment #2
bailey86 CreditAttribution: bailey86 commentedSorry - 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.
Comment #3
jgsantos CreditAttribution: jgsantos commentedI am having the same problem. If I find a solution I'll post here.
Comment #4
anmolgoyal74 CreditAttribution: anmolgoyal74 at OpenSense Labs for DrupalFit commentedPlease refer to this
https://www.drupal.org/project/auto_nodetitle/issues/1910016 comment #5
Comment #5
gaurav.kapoor CreditAttribution: gaurav.kapoor commented