Closed (outdated)
Project:
Webform
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2015 at 11:57 UTC
Updated:
23 Sep 2025 at 18:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
danchadwick commentedNo clue, since you didn't provide enough to help you.
I suggest you look at the built in view that generates the results table to see how it should be configured. Also look at the generated query.
Comment #3
kumkum29 commentedHello,
I have the same problem. Datas aren't displaying when we use the field "Webform submission data: All values"...
Have you any idea for resolve this problem?
Thanks.
Comment #4
carchekysame problem, but not see where this issue is fixed....
Comment #5
carchekyComment #6
joelhsmith commentedI'm having the same problem. Using Views 7.x-3.13 with Webform 7.x-4.12. Shouldn't this show a field with webform submission data from any webform?
Comment #7
cobadger commentedComment #8
cobadger commentedComment #9
cobadger commentedI can confirm that this problem exists. We're using Webform Version: 7.x-4.12 and Views Version: 7.x-3.13.
To recreate the problem:
The result that we observe is that once the contextual filter is removed, none of the data from "Webform submission data: All values" appear in the view results.
We discovered that with the exception of a space in the 'WHERE' clause, the database queries are identical.
Here's the diff between the 'Webform Results' view and the view after being modified per the above (our webform node id is 54):
Here's our db query from the 'Webform Results' view, using our nid = 54 as the value of the contextual filter:
Here's our db query from the view after being modified per the above:
To reiterate, the view as modified contains no values for the 'Webform submission data: All values' views field.
Note that we have not changed the "exclude from display" setting for this field from the original:
$handler->display->display_options['fields']['webform_all_fields']['exclude'] = TRUE;I'm not sure how this data appears in the 'Webform Results' view as provided by the module, but it does.
Comment #10
joelhsmith commented@COBadger Thank you for confirming. Are you suggesting the module needs a patch?
Comment #11
cobadger commented@joelhsmith I believe that it does. My take is that the hook_views_pre_view() function looks for a webform nid only as its first argument and won't attach webform component results unless it finds a webform nid as the first argument.
To generalize, the view could be built with a webform nid coming from one of three places:
Please see the attached patch to address each of these possibilities.
Comment #12
cobadger commentedRevised patch to remove debugging call.
Comment #13
cobadger commentedComment #15
cobadger commentedRevised patch.
Comment #16
cobadger commentedRevised to better handle views filters
Comment #17
joelhsmith commented@COBadger Thank you for working on this. I ran the #16 patch, and I followed your instructions to attempt to replicate, but the data is still missing, from the "Webform submission data: All values". Below is my views export:
Did I not follow your instructions correctly?
Comment #18
cobadger commented@joelhsmith I'm not sure. I imported your view, updated the filter node id to match a webform node from our site and I'm seeing all of the fields in the preview.
Comment #19
biarr commentedThe patch in #16 is working as expected. Thanks!
Comment #20
antonio.bertolini commentedPatch not working also in my case.
My scenario is:
view block with two contextual filter:
- per current user (When the filter value is NOT available => provide default value => User ID from logged in user)
- per current node (When the filter value is NOT available => provide default value => Content ID from URL)
Given a webform, I want to show submission filtered by current user but
_webform_view_find_id($view, $display_id, 'argument', array('field' => 'nid', 'table' => 'webform_submissions'));return 0. so I change
to
Saluti!
Comment #21
antonio.bertolini commentedComment #22
liam morlandComment #23
julia.klimovsky commentedJust reroll patch without any modifications.
Comment #24
julia.klimovsky commentedComment #25
liam morlandComment #27
liam morlandComment #28
liam morlandComment #29
liam morlandPlease fix the coding standards issues. Others who are having this problem, please review the patch.
Comment #30
julia.klimovsky commentedRerolled against HEAD of 7.x-4.x.
Also fixed coding standards issues to address #29
Comment #31
julia.klimovsky commentedComment #32
drupal_josh commentedPatch #30 didn't work for me. Tried various combinations and individual contextual filters and relationships. Can't get any columns to show up in a views table.
Also tried making the changes from #20 but that didn't work either.
A simple guide would be immensely helpful.
Comment #33
drupal_josh commentedAhh I got it. patch #30 did work in my case. Sorry.
I didn't use a contextual filter or a relationship. I used a regular filter for
Content: nidand set it to the webform nid.That's it.
Webform submission data: All valuesshould now show all the columns.Didn't need to make it dynamic (it was a one off view for this form) so not sure how to get it working with a contextual filter. Maybe an exposed filter would work without additional mods.
For those who want to dig and debug the code some more.
webform/views/webform.views.inclines~539 - 567(after patching and at time of writing) is where it sets the variable$webform_nid. Have to make sure this gets set with a valid value.Comment #34
dromansab commentedHello,
Patch #30 doesn't work for me. I've tried with and without contextual filter and the view is not printing values.
Comment #35
liam morlandDrupal 7 is no longer supported. If this applies to a supported version, please re-open.