Due to the nature of this module, the module weight should be set to a higher number to allow the hook_nodeapi implementation to run after the nodereference field.

Currently it can run before, which means that when a node is saved and the counts are calculated the current node will not be included. This also causes problems for the delete and insert operations as the field value hasn't been set yet.

Here is a simple patch to rectify this.

CommentFileSizeAuthor
nodereference_count_install.patch1.43 KBsmoothify

Comments

gilgabar’s picture

Status: Active » Needs review

Thanks, my limited testing hadn't caught this case. I will review the patch as soon as I have a chance.

gilgabar’s picture

Status: Needs review » Fixed

Patch looks good. Committed to HEAD and should be available in a dev release shortly.

Status: Fixed » Closed (fixed)

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