just to prove that my code would work, I put it in hook_node_update(). Unfortunately, that hook runs before node_save() completes, so the updated data is not written to the DB yet. I can't find any hook that runs after node_save() is complete. Does anyone have any ideas?
Nancy
Nancy, you might try: https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function.... And you might have to reset the entity cache. This is untested.
entity_get_controller('node')->resetCache(array($node->nid));
Lucas MTech, LLC http://www.mtechinformationsolutions.com
On Thu, Sep 12, 2013 at 1:36 PM, Nancy Wichmann nan_wich@bellsouth.netwrote:
just to prove that my code would work, I put it in hook_node_update(). Unfortunately, that hook runs before node_save() completes, so the updated data is not written to the DB yet. I can't find any hook that runs after node_save() is complete. Does anyone have any ideas?
*Nancy*
-- [ Drupal support list | http://lists.drupal.org/ ]
Thanks. It still seems "wrong" to me, but I can't argue with success.
Nancy
From: Lucas D Hedding lucashedding@gmail.com To: support@drupal.org; Nancy Wichmann nan_wich@bellsouth.net Sent: Thursday, September 12, 2013 2:45 PM Subject: Re: [support] Hook after node_save()
Nancy, you might try: https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function.... And you might have to reset the entity cache. This is untested.
entity_get_controller('node')->resetCache(array($node->nid));
Lucas MTech, LLC
On Thu, Sep 12, 2013 at 1:36 PM, Nancy Wichmann nan_wich@bellsouth.net wrote:
just to prove that my code would work, I put it in hook_node_update(). Unfortunately, that hook runs before node_save() completes, so the updated data is not written to the DB yet. I can't find any hook that runs after node_save() is complete. Does anyone have any ideas?
Nancy -- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]