I get this on the creation of a new node. Here is a patch to fix.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | entityreference_count-check_for_nid-2106755-2.patch | 495 bytes | mariacha1 |
I get this on the creation of a new node. Here is a patch to fix.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | entityreference_count-check_for_nid-2106755-2.patch | 495 bytes | mariacha1 |
Comments
Comment #1
webchimpAU commentedI am getting this error as well. Happens when I create a node that has an Entity Reference Count field using node_save but not when I create it through the admin area.
I tried the patch which got rid of the error but it also stopped the field from counting.
If anyone else is getting this error, this was my solution which seems to be working:
I changed line 223 from:
if (!empty($db)) {to
if (!empty($db) && isset($entity->{$entity_info['entity keys']['id']})) {Comment #2
mariacha1 commentedHere's a patch for the alteration described in #1.
Comment #3
damienmckennaThe second patch is the correct one.
Comment #4
damienmckennaComment #5
damienmckennaFYI the patch in #2 does fix the problem.
Comment #6
khalor commentedCan confirm patch in #2 fixes the issue
Comment #8
WorldFallz commentedI couldn't replicate this behavior, but we have 2 separate confirmations that the patch fixes the issue, so committed and pushed to 7.x-1.x! Thanks everyone.