I'm looking to create a views list, of forms, and mark which forms the user has already filled out / completed / submitted.

I have tried to do this by adding the Views Relationships:

  • Content: Webform submission
  • (Webform Submission) Webform submissions: User

Then adding a Field called:

  • User: Webform submission count

So I can at least display which forms the user has already submitted, and how many times.
However I then get this error:

Fatal error:  Call to a member function execute() on a non-object in /drupal7/sites/all/modules/webform/views/webform_handler_field_submission_count.inc on line 55

Help!?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wOOge’s picture

Title: Create a views list of forms already filled out by user (submission_count). » Create a Views list of forms filled out by user (submission_count Error).

Updated title to include error detail.

ibexy’s picture

Am having this same issue now.

quicksketch’s picture

Title: Create a Views list of forms filled out by user (submission_count Error). » Adding views field "User: Webform submission count" results in "Call to a member function execute()"

Updating title. @ibexy: I marked your other issue at #1437014: An AJAX HTTP Error message in VIEWS after upgrade to Drupal 7.12 duplicate.

jwjoshuawalker’s picture

This is an easy fix, probably a typo, countQuery is missing '()'.

This:

        ->countQuery->execute()->fetchField();

Should be this:

        ->countQuery()->execute()->fetchField();

(line 55 of /modules/webform/views/webform_handler_field_submission_count.inc)

anou’s picture

Version: 7.x-3.15 » 7.x-3.18
FileSize
631 bytes

And here's a patch against 7.x-3.x branch but it should apply without problem I think on 7.x-4.x...

quicksketch’s picture

Status: Active » Needs review

Excellent, thanks @anou!

quicksketch’s picture

Status: Needs review » Fixed

Committed to 7.x-3.x and 7.x-4.x branches.

Status: Fixed » Closed (fixed)

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