I've read "quick and dirty", I've tried every variation of drupal_execute() but for the life of me I simply am unable to add a single node in code. This is sort of a "make or break" issue for me and Drupal as it seems such a basic task, but all the tutorials contain (...) elipses where something important must be hapenning because when I call drupal execute with my set of values & form state, either all hell breaks loose or simply nothing happens. Wits end, ya know?

Thanks so much.

James

(Attached below is my vain attempt at adding/updating a node) when clicking a button on my modules administration page. I would be eternally grateful for your assistance.

CommentFileSizeAuthor
gearshop-data.zip3.76 KBjakenuts

Comments

akahn’s picture

Title: Could someone provide a real, working example of programatically adding/updating CCK types (with taxonomical fields) for 6.0? » Programatically creating CCK nodes with drupal_execute()
Version: 6.x-2.x-dev » 6.x-2.0-rc10

I agree that this is something that should be documented, and updated for 6.x-2.0, if necessary.

James, maybe you can be more specific in what your issue is. The lines in your module that look like $values['field_price'][0]['value'] = should work correctly. That's what I'm doing in some code I'm working on.

-Alex