Drupal 7 and field_reference 1.0, I created a field_reference field with granularity entity and revision pointing to an image field on nodes. I then created a node with that image field set, and created another node with the field_reference field value set to the first image field. Getting these errors when I view the node with the field_reference value set:
Warning: array_flip() expects parameter 1 to be array, string given in DrupalDefaultEntityController->load() (line 173 of /Library/WebServer/Documents/wise_d7/drupal/includes/entity.inc).
Warning: Invalid argument supplied for foreach() in DatabaseCondition->compile() (line 1864 of /Library/WebServer/Documents/wise_d7/drupal/includes/database/query.inc).
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 2: SELECT revision.vid AS vid, base.uid AS uid, revision.title AS title, revision.log AS log, revision.status AS status, revision.comment AS comment, revision.promote AS promote, revision.sticky AS sticky, base.nid AS nid, base.type AS type, base.language AS language, base.created AS created, base.changed AS changed, base.tnid AS tnid, base.translate AS translate, revision.timestamp AS revision_timestamp, revision.uid AS revision_uid FROM {node} base INNER JOIN {node_revision} revision ON revision.nid = base.nid AND revision.vid = :revisionId WHERE (base.nid IN ()) ; Array ( [:revisionId] => 7 ) in DrupalDefaultEntityController->load() (line 191 of /Library/WebServer/Documents/wise_d7/drupal/includes/entity.inc).
I found and implemented a fix, patch coming.
Comment | File | Size | Author |
---|---|---|---|
#1 | fix_entity_load_function_call-2193833-1.patch | 1.01 KB | m4olivei |
Comments
Comment #1
m4oliveiPatch attached.
Comment #2
BBCThanks. This patch solved the issue for me. The error above describes what happens when the entitycache module is turned on. Disabling entitycache yields the following warnings.
Comment #3
danielb CreditAttribution: danielb commented