Both hook_gathercontent_pre_node_save_alter and hook_gathercontent_post_node_save are broken due to the invalid argument being passed. The $entity (NULL) should be replace with $node.

Replace
drupal_alter('gathercontent_pre_node_save', $entity, $content, $files);
module_invoke_all('gathercontent_post_node_save', $entity, $content, $files);

with
drupal_alter('gathercontent_pre_node_save', $node, $content, $files);
module_invoke_all('gathercontent_post_node_save', $node, $content, $files);

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xlin1003 created an issue. See original summary.

xlin1003’s picture

Status: Active » Needs review
FileSize
990 bytes

Patch attached.

mirom’s picture

Patch updated with additional changes of $entity variable to $node variable.

  • mirom authored 1bef124 on 7.x-3.x
    Issue #2849532 by xlin1003, mirom: Fixed node save hook
    
mirom’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.