Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#5 | 283931-hook_nodeapi_insert.diff | 598 bytes | jeffschuler |
Comments
Comment #1
eikes CreditAttribution: eikes commentedi second that!
Comment #2
Barry Madore CreditAttribution: Barry Madore commentedMoving
Comment #3
threexk CreditAttribution: threexk commentedagree
Comment #4
jeffschulerComment #5
jeffschulerPatch to change inline description of hook_nodeapi_insert to:
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...?
Comment #6
jeffschulerComment #7
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.