[development] what's the best way to create nodes from code?
domenic at workhabit.com
Fri Oct 30 19:06:17 UTC 2009
On Oct 30, 2009, at 11:57 AM, andrew morton wrote:
> On Fri, Oct 30, 2009 at 2:44 PM, Domenic Santangelo
> <domenic at workhabit.com> wrote:
>> On Oct 30, 2009, at 11:34 AM, Emma Irwin wrote:
>> Isn't there a need for node_submit() as well before node_save(); ?
>> In D6, yes. Also to clarify Alex's point, a pure node_submit() +
>> is indeed faster -- because it doesn't hit any hooks. The "proper"
>> way to
>> save a node programmatically is in the comments for drupal_execute():
> Maybe I'm being a bit too literal but saying you're not hitting *any*
> hooks is incorrect. You avoid all the form building and altering calls
> but you definitely fire off hooks submit, insert/update hooks.
No no you're right, I should have been clearer (or not responded when
on a phone call :).
[Freenode]entendu @ #drupal
More information about the development