Drupal : Order of Hook Execution

Ever wondered what would be the order of execution of same hooks from different modules.

Say you have two modules active m1 and m2, each of which have the following functions
m1_node_presave($node) : Replaces Node's Title with "Title A" before saving
m2_node_presave($node) : Replaces Node's Title with "Title B" before saving

What would be the title of the node when saved?

Then you gotta check out hook_module_implements_alter

Drupal: node_save and special characters

  • Trying to create nodes or taxonomy terms programatically?
  • Have characters like "é", "è" or "à" in the title or body or any of the fields?
  • Struck with database errors while doing node_save ?
  • Is the text being truncated after the first occurrence of such a character?

Stop pulling out your hair on these encoding/charset problem...

With Drupal, everything is encoded (and expected) in the UTF-8 charset.