Druapl Fields not saved to the database

You basically have a field or fields on your node that do not update. In my case it was the Meta Tags field not being saved.

I was surprised that not much comes up in Google about this issue. So I'm writing this article and so people searching: drupal fields not saved or drupal fields no updating or drupal fields not saving ...etc... can find this and save themselves  hours of debugging.

This problem was long and painful (yes painful) to troubleshoot.

Basically it came down to the php function function_exists()  called by module_hook() in module.inc. It would return false when it should have returned true since my module (nodewords) had some stuff to write to the database.

How could that be ?

It looks like my module (in this case nodewords ) was not loaded yet so by decreasing the value of the field "weight" in the Drupal System table for my module, I was able to have it load sooner so function_exists('nodewords_node_api') returned true and Voila! my fields were being saved to the database again.


You can see my full thread on this at: http://drupal.org/node/146458