Building Node module (Order of hook execution)

satynos - July 17, 2007 - 17:49

I am presently developing a content module (based on default node type, not CCK) and would like to know the order of hook execution that happen, which helps me in writing the relevant hook. After browsing a lot on drupal forum and google search, I found the following:

New Node Creation

  • node/add/type (first visualization):
    prepare form
  • node preview new node (validation unsuccessful):
    prepare form validate (show form again with errors)
  • node preview new node (validation successful):
    prepare form validate view
  • node submit new node (validation unsuccessful):
    prepare form validate (show form again with errors)
  • node submit new node (validation successful):
    prepare form validate submit insert
  • node view:
    load view

Edit Node (Update existing node)

  • node edit:
    load prepare form
  • node preview existing node(validation successful):
    load prepare form validate view
  • node submit existing node:
    load prepare form validate submit update

Is this order of hook execution correct?
Thanks in advance.

 
 

Drupal is a registered trademark of Dries Buytaert.