It would be useful to clarify that the 'insert' operation is called *after* the node has been added to the database -- in other words, altering $node here has no effect.

ie, change:

"insert": The node is being created (inserted in the database).

to

"insert": The node has just been created (inserted in the database).

CommentFileSizeAuthor
#5 283931-hook_nodeapi_insert.diff598 bytesjeffschuler
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eikes’s picture

i second that!

Barry Madore’s picture

Project: Documentation » Drupal core
Version: » 7.x-dev
Component: Documentation in CVS » documentation

Moving

threexk’s picture

agree

jeffschuler’s picture

Assigned: Unassigned » jeffschuler
jeffschuler’s picture

Status: Active » Needs review
FileSize
598 bytes

Patch to change inline description of hook_nodeapi_insert to:

Respond to node insertion.
Take action when a new node of any type is being inserted in the database.

Looks like there are a number of ways of describing a hook that operates after something happens: "allow modules to interact with...", "Respond to...", "Act on..." (see node.api.php functions.) I'm not sure what the best wording is, but maybe these should be made more consistent...?

jeffschuler’s picture

Assigned: jeffschuler » Unassigned
Dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.