Skip to main content
deleted 8 characters in body
Source Link
sndr
  • 1
  • 2

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.

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_site.module and my hooks started with MYMODULE. 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 MYMODULE.module and now MYMODULE_node_presave() works.

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 custom_site.module and my hooks started with custom. 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 custom.module and now custom_node_presave() works.

added 8 characters in body
Source Link
sndr
  • 1
  • 2

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 custom_siteMYMODULE_site.module and my hooks started with customMYMODULE. 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 customMYMODULE.module and now custom_node_presaveMYMODULE_node_presave() works.

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 custom_site.module and my hooks started with custom. 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 custom.module and now custom_node_presave() works.

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_site.module and my hooks started with MYMODULE. 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 MYMODULE.module and now MYMODULE_node_presave() works.

added 325 characters in body
Source Link
sndr
  • 1
  • 2

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 custom_site.module and my hooks started with custom. 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 custom.module and now custom_node_presave() works.

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?

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 custom_site.module and my hooks started with custom. 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 custom.module and now custom_node_presave() works.

deleted 23 characters in body; edited tags; edited title
Source Link
leymannx
  • 18.8k
  • 6
  • 72
  • 126
Loading
Source Link
sndr
  • 1
  • 2
Loading