Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When saving nodes that have field collections, I get this error (I realize this is specific to my site's DB):
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'nid' in where clause is ambiguous: SELECT DISTINCT node.nid AS entity_id, node.vid AS revision_id, node.type AS bundle, :entity_type AS entity_type FROM {node} node INNER JOIN {node_access} na ON na.nid = node.nid WHERE (nid IN (:db_condition_placeholder_0)) AND (type IN (:db_condition_placeholder_1)) AND(( (na.gid = :db_condition_placeholder_2) AND (na.realm = :db_condition_placeholder_3) )OR( (na.gid = :db_condition_placeholder_4) AND (na.realm = :db_condition_placeholder_5) )OR( (na.gid = :db_condition_placeholder_6) AND (na.realm = :db_condition_placeholder_7) )OR( (na.gid = :db_condition_placeholder_8) AND (na.realm = :db_condition_placeholder_9) ))AND (na.grant_view >= :db_condition_placeholder_10) ; Array ( [:db_condition_placeholder_0] => 2 [:db_condition_placeholder_1] => company_organization [:db_condition_placeholder_2] => 0 [:db_condition_placeholder_3] => all [:db_condition_placeholder_4] => 5 [:db_condition_placeholder_5] => content_access_author [:db_condition_placeholder_6] => 2 [:db_condition_placeholder_7] => content_access_rid [:db_condition_placeholder_8] => 7 [:db_condition_placeholder_9] => content_access_rid [:db_condition_placeholder_10] => 1 [:entity_type] => node ) in EntityFieldQuery->execute() (line 1136 of /var/www/html/fd/includes/entity.inc).
This may be a problem in Drupal core. I had Field Collection running on my site when it ran Drupal 7.10, and things worked. It was after my upgrade to Drupal 7.12 that I noticed the problems crop up.
Comments
Comment #1
visuaLatte CreditAttribution: visuaLatte commentedNote: I did delete all my fields, uninstall the module, and reinstalled it. I still get the error.
Comment #2
ktleow CreditAttribution: ktleow commentedAm having the same issue with 7.x-1.0-beta4 as well.
Could not save a node with Field Collection.
Comment #3
jmuzz CreditAttribution: jmuzz commented@visuaLatte is it still happening? Maybe you can provide some details about the entity field query being run. If it's not yours then you can see how it is getting executed with a backtrace.
debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)
@ktleow, that's a different error. It would be better to open a new issue for it if it's still happening.
Comment #4
jmuzz CreditAttribution: jmuzz commented