Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'uid' in where clause is ambiguous: SELECT COUNT(*) AS expression FROM {webform_submissions} ws LEFT OUTER JOIN {users} u ON u.uid = ws.uid WHERE (nid = :db_condition_placeholder_0) AND (uid = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => 6 [:db_condition_placeholder_1] => 1 ) in PagerDefault->execute() (line 75 of /Applications/MAMP/htdocs/drupal/includes/pager.inc).
Comment | File | Size | Author |
---|---|---|---|
#6 | webform_previous_submissions_exception.patch | 1.01 KB | quicksketch |
#3 | 1074326-previous_submissions_db_exception.patch | 655 bytes | neclimdul |
Comments
Comment #1
ryantboyd CreditAttribution: ryantboyd commentedSorry, should have added. This error comes up after submission when you return to the webform and have this link: You have already submitted this form. View your previous submissions.
Clicking on "View your previous submissions." Goes to a page that gives:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'uid' in where clause is ambiguous: SELECT COUNT(*) AS expression FROM {webform_submissions} ws LEFT OUTER JOIN {users} u ON u.uid = ws.uid WHERE (nid = :db_condition_placeholder_0) AND (uid = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => 6 [:db_condition_placeholder_1] => 1 ) in PagerDefault->execute() (line 75 of /Applications/MAMP/htdocs/drupal/includes/pager.inc)
Comment #2
anavarreI confirm this issue.
Comment #3
neclimdulComment #4
neclimdulThis does actually fall in the critical or at least major priority.
Comment #5
anavarreThis patch works fine for me. Thank you !
Comment #6
quicksketchThanks neclimdul. I've adjusted the patch to match our approach in the D6 version of the module, which adjusts the "uid" filter inside of the webform_get_submissions() function. I've committed and pushed the attached patch to the 7.x branch.
Comment #7
mgiffordExcellent. I just ran into this problem and happy to see it's already been fixed.
48hr turn around time too!
Oh ya, patch applies nicely, but you probably already knew that.
Comment #8
Blooniverse CreditAttribution: Blooniverse commented... the new title indicates more uniquely the substance & subject of this bug.
Comment #9
bradjones1@quicksketch - is there a reason the patch in #6 is from a drupal root directory, not the module? My file structure isn't the same so I couldn't apply it directly from the module dir. root. Just curious.
Comment #10
neclimdul@bradjones1 I'm sure he just had a install with webforms laying around that was part of a version controlled site. The patch was made against that for simplicity and he forgot to clean it. Its actually the same way i made my patch I just I remembered to clean it. Replace the "sites/all/modules/" with "" and it will apply just fine inside the modules directory.
Comment #11
quicksketchOr just install 3.9. The patch in this issue is already in that version.