I am getting an undefined property (nid) when the entityreference_count_get_count looks for an nid on the entity. It does not have an nid at this point, but it does if I use entityreference_count_field_insert. Attached is a patch.

CommentFileSizeAuthor
fix-count-trigger.patch702 bytesRobKoberg

Comments

RobKoberg’s picture

THis is wrong. The count was not updating with the insert. When I use presave (what is in the latest code in the repo), I get the following error on node create:

Notice: Undefined property: stdClass::$nid in entityreference_count_get_count() (line 232 of /Users/rkoberg/Sites/mash/docroot/sites/all/modules/entityreference_count/entityreference_count.module).

There is no nid at this point in the save, so I am not really understanding what is going on here.

damienmckenna’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

There are a few RTBC patches in the issue queue that should help (especially the $nid bug), please give them a try and report back.

WorldFallz’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I've committed a number of patches in the day or so. In my testing I see no errors or warnings of any kind. Please re-open if this is still happening. And be sure to include the steps necessary to reproduce. Thanks!