View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06932Bug reportsStatisticspublic2012-11-28 13:20
ReporterpfpDave Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary06932: Clicking browse on text entries returns no results in statistics screen (with fix)
Description

When viewing statistics witha text entries, clicking the browse button to see these returns nothing.

The error is found in \application\controllers\admin\statistics.php and is on line 497. To resolve replace:

    $search['condition']= $column . " != ''";

with

    $search['condition']= "'" . $column . "' != ''";
TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)121115
I will donate to the project if issue is resolvedNo
BrowserIE8
Database type & versionSQL Express 2012
Server OS (if known)Server 2008
Webserver software & version (if known)IIS 7
PHP Version5.4.8

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-11-25 22:00

administrator   ~22494

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=10480

c_schmitz

c_schmitz

2012-11-25 22:24

administrator   ~22500

Fix committed to 2.1 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=10485

pfpDave

pfpDave

2012-11-26 12:27

reporter   ~22538

Not had time to properly diagnose what's going on yet but this fix doesn't work for me. When implemented in build 121115 (note my fix posted works fine), I get:

<h1>CDbException</h1>
<p>CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]The data types text and varchar are incompatible in the not equal to operator.. The SQL statement executed was: SELECT * FROM [dbo].[survey_997138] [t] WHERE [997138X21X395] != '' (C:\limesurvey\framework\db\CDbCommand.php:528)</p><pre>#0 C:\limesurvey\framework\db\CDbCommand.php(390): CDbCommand->queryInternal('fetchAll', Array, Array)
#1 C:\limesurvey\framework\db\ar\CActiveRecord.php(1287): CDbCommand->queryAll()
#2 C:\limesurvey\application\models\LSActiveRecord.php(34): CActiveRecord->query(Object(CDbCriteria), true)
#3 C:\limesurvey\framework\db\ar\CActiveRecord.php(1406): LSActiveRecord->query(Object(CDbCriteria), true)
#4 C:\limesurvey\application\controllers\admin\statistics.php(502): CActiveRecord->findAll(Array)
#5 [internal function]: statistics->listcolumn('997138', '997138X21X395', '', '', '')
#6 C:\limesurvey\framework\web\actions\CAction.php(107): ReflectionMethod->invokeArgs(Object(statistics), Array)
#7 C:\limesurvey\application\core\Survey_Common_Action.php(82): CAction->runWithParamsInternal(Object(statistics), Object(ReflectionMethod), Array)
#8 C:\limesurvey\framework\web\CController.php(309): Survey_Common_Action->runWithParams(Array)
#9 C:\limesurvey\framework\web\CController.php(287): CController->runAction(Object(statistics))
#10 C:\limesurvey\framework\web\CController.php(266): CController->runActionWithFilters(Object(statistics), Array)
#11 C:\limesurvey\application\controllers\AdminController.php(159): CController->run('statistics')
#12 C:\limesurvey\framework\web\CWebApplication.php(276): AdminController->run('statistics')
#13 C:\limesurvey\framework\web\CWebApplication.php(135): CWebApplication->runController('admin/statistic...')
#14 C:\limesurvey\framework\base\CApplication.php(162): CWebApplication->processRequest()
#15 C:\limesurvey\index.php(178): CApplication->run()
#16 {main}</pre>


When implemented in build 121121, I get (this seems to relate to the new lines of code at 498 - 501:

<h1>PHP Error [2]</h1>
<p>Invalid argument supplied for foreach() (C:\limesurvey_test\application\controllers\admin\statistics.php:499)</p>
<pre>#0 C:\limesurvey_test\application\controllers\admin\statistics.php(499): LSYii_Application->handleError()
#1 unknown(0): statistics->listcolumn()
#2 C:\limesurvey_test\framework\web\actions\CAction.php(107): ReflectionMethod->invokeArgs()
#3 C:\limesurvey_test\application\core\Survey_Common_Action.php(82): statistics->runWithParamsInternal()
#4 C:\limesurvey_test\framework\web\CController.php(309): statistics->runWithParams()
#5 C:\limesurvey_test\framework\web\CController.php(287): AdminController->runAction()
#6 C:\limesurvey_test\framework\web\CController.php(266): AdminController->runActionWithFilters()
#7 C:\limesurvey_test\application\controllers\AdminController.php(159): AdminController->run()
#8 C:\limesurvey_test\framework\web\CWebApplication.php(276): AdminController->run()
#9 C:\limesurvey_test\framework\web\CWebApplication.php(135): LSYii_Application->runController()
#10 C:\limesurvey_test\framework\base\CApplication.php(162): LSYii_Application->processRequest()
#11 C:\limesurvey_test\index.php(178): LSYii_Application->run()
</pre>

c_schmitz

c_schmitz

2012-11-26 13:43

administrator   ~22539

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=10494

pfpDave

pfpDave

2012-11-26 13:49

reporter   ~22540

That fix seems to work for me in build 121121, many thanks

c_schmitz

c_schmitz

2012-11-27 06:11

administrator   ~22567

New 2.00+ build released.

c_schmitz

c_schmitz

2012-11-28 13:20

administrator   ~22619

Fix committed to 2.1 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=10519

Related Changesets

LimeSurvey: master 7f41c5d1

2012-11-25 21:00:47

c_schmitz

Details Diff
Fixed issue 06932: Clicking browse on text entries returns no results in statistics screen in MSSQL Affected Issues
06932
mod - application/controllers/admin/statistics.php Diff File

LimeSurvey: 2.1 5b32ef81

2012-11-25 21:24:00

c_schmitz

Details Diff
Fixed issue 06932: Clicking browse on text entries returns no results in statistics screen in MSSQL Affected Issues
06932
mod - application/controllers/admin/statistics.php Diff File

LimeSurvey: master 87836a6d

2012-11-26 12:43:38

c_schmitz

Details Diff
Fixed issue 06932: Clicking browse on text entries returns no results in statistics screen in MSSQL Affected Issues
06932
mod - application/controllers/admin/statistics.php Diff File

LimeSurvey: 2.1 656d7d49

2012-11-26 12:43:38

c_schmitz

Details Diff
Fixed issue 06932: Clicking browse on text entries returns no results in statistics screen in MSSQL Affected Issues
06932
mod - application/controllers/admin/statistics.php Diff File

Issue History

Date Modified Username Field Change
2012-11-22 15:37 pfpDave New Issue
2012-11-25 22:00 c_schmitz Assigned To => c_schmitz
2012-11-25 22:00 c_schmitz Status new => assigned
2012-11-25 22:00 c_schmitz Changeset attached => LimeSurvey master 7f41c5d1
2012-11-25 22:00 c_schmitz Note Added: 22494
2012-11-25 22:00 c_schmitz Resolution open => fixed
2012-11-25 22:01 c_schmitz Status assigned => resolved
2012-11-25 22:01 c_schmitz Fixed in Version => 2.00+
2012-11-25 22:24 c_schmitz Changeset attached => LimeSurvey 2.1 5b32ef81
2012-11-25 22:24 c_schmitz Note Added: 22500
2012-11-26 12:27 pfpDave Note Added: 22538
2012-11-26 13:43 c_schmitz Changeset attached => LimeSurvey master 87836a6d
2012-11-26 13:43 c_schmitz Note Added: 22539
2012-11-26 13:49 pfpDave Note Added: 22540
2012-11-27 06:11 c_schmitz Note Added: 22567
2012-11-27 06:11 c_schmitz Status resolved => closed
2012-11-28 13:20 c_schmitz Changeset attached => LimeSurvey 2.1 656d7d49
2012-11-28 13:20 c_schmitz Note Added: 22619