On 6/7/06, <b class="gmail_sendername">Jim Riggs</b> <<a href="mailto:drupal-lists@jimandlissa.com">drupal-lists@jimandlissa.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You can take a look at my quotes.module. It can import several<br>quotes through a single node submission form. Although the concept<br>is a bit different from what you are doing, it does have to<br>individually validate and submit each quote. You might be able to
<br>get some hints from it...or give me some hints if you see problems<br>with my code! ;-)</blockquote><div><br>The problem with your importing code is exactly what I was pointing out. Suppose I attach a required taxonomy to the "quotes" content type. You don't set it. You don't validate it. Still the node is created.
<br>Or if I use hook_form_alter() to add a "#required" to the title textfield so it must be non-empty... you'll happily save the node without the title set.<br><br>You also bail out creating quotes from the first error you encounter while I would like to import the next rows too.
<br><br>I may have misread the code.<br><br>Now for your specific case, this may be ok, but for a generic node_import it is not.<br><br>Robrecht</div></div><br>