Posted by abbasmousavi on January 24, 2011 at 10:58pm
4 followers
| Project: | Webform |
| Version: | 7.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I am using drupal 7 with webform 7.x-3.6 and I have a webform with 150 submissions, I can see all submissions under the submissions and table tabs but the analysis tab says
There are no submissions for this form
my webform consists of 40 select option components
Comments
#1
Is there anyone with this problem?
#2
I can't reproduce this problem. Perhaps try the development version would fix this? https://drupal.org/node/730862
#3
#4
#5
#6
I have downloaded the last development version
but it doesn't solve the problem.
I have some select options and some textfield component, I can see all results in results submission and table tabs but in analysis tab I only see the textfields component analysis
here is the nodeexport of the webform
I have attached node export of the webform
#7
when I comment out line 550 in webform/components/select.inc
I can see analysis for all select option components.
<?php
/**
* Implementation of _webform_analysis_component().
*/
function _webform_analysis_select($component, $sids = array(), $single = FALSE) {
$options = _webform_select_options($component);
$show_other_results = $single;
$sid_placeholders = count($sids) ? array_fill(0, count($sids), "'%s'") : array();
$sid_filter = count($sids) ? " AND sid IN (" . implode(",", $sid_placeholders) . ")" : "";
$option_operator = $show_other_results ? 'NOT IN' : 'IN';
$query = db_select('webform_submitted_data', 'wsd', array('fetch' => PDO::FETCH_ASSOC))
->fields('wsd', array('data'))
->condition('nid', $component['nid'])
->condition('cid', $component['cid'])
->condition('data', '', '<>')
//->condition('data', $options, $option_operator)
->groupBy('data');
$query->addExpression('COUNT(data)', 'datacount');
if (count($sids)) {
$query->condition('sid', $sids, 'IN');
}
?>
without this change this query result is empty.
#8
Thanks that helps narrow down the problem. Sounds like an issue specific to the select component so I'm updating the title to reflect the problem.
My guess is that:
->condition('data', $options, $option_operator)Needs to be changed to:
->condition('data', array_keys($options), $option_operator)This problem like arose in the D7 port, as it doesn't exist in the D6 version.
#9
It works with the proposed change.
#10
Can it be committed before the next release?
#11
Yes it'll be committed before the next release.
#12
Tested and committed to 7.x-3.x branch.
#13
Automatically closed -- issue fixed for 2 weeks with no activity.
#14
subscribing