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.
| Comment | File | Size | Author |
|---|---|---|---|
| fix-count-trigger.patch | 702 bytes | RobKoberg |
Comments
Comment #1
RobKoberg commentedTHis 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.
Comment #2
damienmckennaThere are a few RTBC patches in the issue queue that should help (especially the $nid bug), please give them a try and report back.
Comment #3
WorldFallz commentedI'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!