Download & Extend

Don't use node_save() use drupal_execute()

Project:Kaltura
Version:6.x-1.4
Component:Code
Category:feature request
Priority:normal
Assigned:Scott Reynolds
Status:postponed (maintainer needs more info)

Issue Summary

This patch removes the node_save() for drupal_execute(). the advantage with this new approach is things like pathauto, comment settings an other things work that have a default value in the node form. Makes things an aweful lot more drupally, still though not the best. If a form element doesnt have a good default value, then it won't work. Things like simple taxonomies that are required probably won't work.

AttachmentSize
execute.patch12.11 KB

Comments

#1

Status:needs review» postponed (maintainer needs more info)

I have heard that drupal_execute() is the recommended way to create nodes programmatically, but am yet to be convinced. I accept that this is (or was when you posted this a year ago!) significant for tools like pathauto and others which hook into the node form, and that's a good reason to consider this patch.

I'd appreciate any references to Drupal module guidelines which are "canonical" on this front. I've done some reading and didn't have much luck finding ... most issue threads on this front seem to contain arguments in favour of both approaches :)

Happy to reconsider this and port the 1.x series patch to 2.x if someone can add a pointer in this direction ... in the absence of that, I'm closing this one as "maintainer needs more info", but am totally open to it.

#2

Category:bug report» feature request

- unless there's a module standard which says otherwise :)