I placed the following function in my custom module.
function MYMODULE_node_update($node) {
if ($node->type === 'page') {
$node->title = 'test';
}
}
When editing and saving a node of content type page nothing happens. What can be the issue?
Problem solved. It seemed to be caused by the following:
my custom module wasn't ending with ?> and above all my module name was MYMODULE_sitecustom_site.module and my hooks started with MYMODULEcustom. This didn't give problems before with my other hooks so I never noticed. (This helped: https://drupal.stackexchange.com/a/111272/85560)
My module name now is MYMODULEcustom.module and now MYMODULE_node_presavecustom_node_presave() works.