You ar enot supposed to change values in $node during validation. Instead, you can change $node->title during nodeapi(submit). That happens after validate and before node_save(). you can then skip the form_set_value() stuff and set directly on $node.
Comments
Comment #1
fagoyes, this was my first approach. But this won't work for node previews... so I see no way to change this. Furthermore I'm just using form_set_value() according to its documentation.
so I set it to won't fix.
Comment #2
moshe weitzman commentedi think nodeapi(prepare) is the way to do this for previews.
Comment #3
fagohm
I'm not sure if this hook is intended to make value changes. However I think it would work to change $node->title there, but I can't get the necessary data at this stage. For getting the data I need the new fully built node object, and this isn't available there.
Furthermore CCK does its 'process form values' step first on validation. I need to access the $node object after this step, or things that use this like the date field will break.
Comment #4
moshe weitzman commentedok ... perhaps add a code comment when you are next in there. will help others understand the decision.
Comment #5
fagook, good idea
Comment #6
fagodone
Comment #7
(not verified) commented