Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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);
Comment | File | Size | Author |
---|---|---|---|
#3 | fixed_node_save_hook-2849532-3.patch | 3.14 KB | mirom |
#2 | 2849532-fixed-node-save-hook-2.patch | 990 bytes | xlin1003 |
Comments
Comment #2
xlin1003 CreditAttribution: xlin1003 commentedPatch attached.
Comment #3
mirom CreditAttribution: mirom at Cheppers for GatherContent commentedPatch updated with additional changes of $entity variable to $node variable.
Comment #5
mirom CreditAttribution: mirom at Cheppers for GatherContent commented