Hi
After creating web form, i tried to open it. But it didnt opened.

Error report
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'nid' in 'where clause': SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {webform_submissions} webform_submissions) subquery WHERE (nid = :db_condition_placeholder_0) AND (uid = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => 34 [:db_condition_placeholder_1] => 1 ) in webform_get_submission_count() (line 407 of .../sites/all/modules/webform/includes/webform.submissions.inc).

CommentFileSizeAuthor
#8 webform-881230.patch1.63 KBJackinloadup

Comments

perke’s picture

same here, using 7.x-3.0-beta7

(subscribing)

duntuk’s picture

yup, same here.

duntuk’s picture

Status: Active » Closed (fixed)
duntuk’s picture

Status: Closed (fixed) » Active

note: Apologies, mistakenly closed this issue. Reopened.

Yes, still getting this error message when logged in as administrator and trying to view any webform node, including when clicking "submissions" or "table". Viewing and submitting the form by anon users works fine.

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'nid' in 'where clause': SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {webform_submissions} webform_submissions) subquery WHERE (nid = :db_condition_placeholder_0) AND (uid = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => 17 [:db_condition_placeholder_1] => 1 )  in webform_get_submission_count() (line 410 of /home/public_html/sites/all/modules/webform/includes/webform.submissions.inc).

my setup:
webform 7.x-3.x-dev (2010/08/30)
drupal 7.x-dev (2010/08/30)

quicksketch’s picture

Status: Active » Postponed

I'm no longer updating Webform to "chase" Drupal 7. If you can provide a patch I'd be happy to review it though.

patoshi’s picture

subscribing

Jackinloadup’s picture

subscribe

Jackinloadup’s picture

Status: Postponed » Needs review
StatusFileSize
new1.63 KB

Ok wow.. i think i figured it out. countQuery needs to be executed right before the execute command? seems to work for me. idk.

looks like it was caused by #423888: Use subqueries for ->countQuery(), at least for MySQL

berenddeboer’s picture

Status: Needs review » Reviewed & tested by the community
duntuk’s picture

patch worked on beta 8 (but not 7.x-3.x-dev oct 1 .. shouldn't have this been applied to dev by now?)

quicksketch’s picture

Doesn't look like it has yet. I'm not yet maintaining Drupal 7 branches due to Drupal 7's continuing tendency to break every release. Webform currently won't run on D7 for more reasons than this one.

Stevel’s picture

Title: PDO exception » PDO exception due to calling countQuery too early.
adiatis’s picture

Drupal 7.0 beta 1 released and they resolved all critical data loss. So I'm testing Drupal 7 now. When will this problem be solved in dev or beta8? Soon?

Webform is an excellent module!! Great work!

ksenzee’s picture

Agree this patch is ready to go.

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks guys.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.