There was recently an update to the nodeprofile module. After upgrading to this module auto nodetitle stopped automatically setting the title of my profile nodes to the username when a user registered on the site. I think the issue is occurring because nodeprofile does not set $node->uid until the "submit" op, which may have been different in earlier versions. To fix it I had to change the auto_nodetitle_nodeapi() function so that auto_nodetitle_set_title() would be ran on "submit" rather than "validate". This fixed the issue, however I did not test if there are any consequences to doing this in other areas.
Original Code:
function auto_nodetitle_nodeapi(&$node, $op, $form = NULL, $a4 = NULL) {
if ($op == 'validate') {
Patched Code:
function auto_nodetitle_nodeapi(&$node, $op, $form = NULL, $a4 = NULL) {
if ($op == 'submit') {
If some one can review this and give some feedback that be great. Feel free to make a patch file for it.
Comments
Comment #1
fagothis change would kill the title during preview - so it's a no go. nodeprofile does so set the user id later on, yes -> so this is by design.
If you still want to set the title you could try by doing it with a workflow-ng rule which is invoked after the content has been inserted. then use a php action to set $node->title to $user->name.