View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
18736Bug reportsImport/Exportpublic2023-05-22 11:30
ReporterMikeatEduTech Assigned Toc_schmitz  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version6.0.x 
Summary18736: Error exporting participants from MSSQL db
Description

Attempting to export participants from any given survey results in this error page:

It looks like the webpage at https://***********/index.php?r=admin/tokens/sa/exportdialog/surveyid/292653 might be having issues, or it may have moved permanently to a new web address.
ERR_INVALID_RESPONSE

Stack trace:

[error] [system.db.CDbCommand] CDbCommand::fetchColumn() failed: SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Column "lime_tokens_292653.tid" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause.. The SQL statement executed was: SELECT count(*)
FROM [lime_tokens_292653] [lt]
WHERE 1=1
ORDER BY [lt].[tid].
2023/04/10 10:44:05 [error] [exception.CDbException] CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Column "lime_tokens_292653.tid" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause. in C:\inetpub\wwwroot\limesurvey\vendor\yiisoft\yii\framework\db\CDbCommand.php:543
Stack trace:
#0 C:\inetpub\wwwroot\limesurvey\vendor\yiisoft\yii\framework\db\CDbCommand.php(433): CDbCommand->queryInternal()
#1 C:\inetpub\wwwroot\limesurvey\application\helpers\export_helper.php(2350): CDbCommand->queryScalar()
#2 C:\inetpub\wwwroot\limesurvey\application\controllers\admin\Tokens.php(1635): tokensExport()
#3 [internal function]: Tokens->exportdialog()
#4 C:\inetpub\wwwroot\limesurvey\vendor\yiisoft\yii\framework\web\actions\CAction.php(115): ReflectionMethod->invokeArgs()
#5 C:\inetpub\wwwroot\limesurvey\application\core\SurveyCommonAction.php(83): CAction->runWithParamsInternal()
#6 C:\inetpub\wwwroot\limesurvey\vendor\yiisoft\yii\framework\web\CController.php(308): SurveyCommonAction->runWithParams()
#7 C:\inetpub\wwwroot\limesurvey\vendor\yiisoft\yii\framework\web\CController.php(286): CController->runAction()
#8 C:\inetpub\wwwroot\limesurvey\vendor\yiisoft\yii\framework\web\CController.php(265): CController->runActionWithFilters()
#9 C:\inetpub\wwwroot\limesurvey\application\controllers\AdminController.php(202): CController->run()
#10 C:\inetpub\wwwroot\limesurvey\vendor\yiisoft\yii\framework\web\CWebApplication.php(282): AdminController->run()
#11 C:\inetpub\wwwroot\limesurvey\vendor\yiisoft\yii\framework\web\CWebApplication.php(141): CWebApplication->runController()
#12 C:\inetpub\wwwroot\limesurvey\vendor\yiisoft\yii\framework\base\CApplication.php(185): CWebApplication->processRequest()
#13 C:\inetpub\wwwroot\limesurvey\index.php(161): CApplication->run()
#14 {main}
REQUEST_URI=/index.php?r=admin/tokens/sa/exportdialog/surveyid/292653
HTTP_REFERER=https://**********/index.php?r=admin/tokens/sa/exportdialog/surveyid/292653

Notes:
Error encountered in 5.6.13+230327 as well as 6.0.0+230405.

Error happens regardless of browser (tested on Chrome, FF, Edge).

CSV exports are confirmed working in other sections, like downloading survey responses.

Steps To Reproduce

Steps to reproduce

Create blank survey.
Survey Participants > Create one or more participants via manual entry or CSV import.
Export > leave default settings > Download CSV file

Expected result

CSV file downloaded.

Actual result

Error page as described in description block.

Tagsmssql
Bug heat8
Complete LimeSurvey version number (& build)6.0.0+230405
I will donate to the project if issue is resolvedNo
BrowserChrome, FF, Edge
Database type & versionMSSQL 2019 15.0.4298.1
Server OS (if known)Windows Server 2019
Webserver software & version (if known)Windows server 2022, IIS 10
PHP Version8.2.4

Users monitoring this issue

DenisChenu

Activities

DenisChenu

DenisChenu

2023-05-17 10:50

developer   ~75018

Why reassign ?
fortunately : I haven't started to work on it.

c_schmitz

c_schmitz

2023-05-17 14:47

administrator   ~75032

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

LimeBot

LimeBot

2023-05-22 11:30

administrator   ~75129

Fixed in Release 6.1.0+230522

Related Changesets

LimeSurvey: 5.x f4ff3399

2023-05-17 16:46

c_schmitz


Details Diff
Fixed issue 18736: Error exporting participants when using MSSQL DB Affected Issues
18736
mod - application/helpers/export_helper.php Diff File

LimeSurvey: master 5482c09e

2023-05-17 16:46

c_schmitz


Details Diff
Fixed issue 18736: Error exporting participants when using MSSQL DB Affected Issues
18736
mod - application/helpers/export_helper.php Diff File

Issue History

Date Modified Username Field Change
2023-04-10 16:55 MikeatEduTech New Issue
2023-04-11 09:32 DenisChenu Issue Monitored: DenisChenu
2023-04-11 09:32 DenisChenu Bug heat 0 => 2
2023-05-04 14:19 ollehar Tag Attached: mssql
2023-05-16 16:06 DenisChenu Assigned To => DenisChenu
2023-05-16 16:06 DenisChenu Status new => assigned
2023-05-17 10:30 p_teichmann Assigned To DenisChenu => c_schmitz
2023-05-17 10:50 DenisChenu Note Added: 75018
2023-05-17 10:50 DenisChenu Bug heat 2 => 4
2023-05-17 14:47 c_schmitz Changeset attached => LimeSurvey 5.x f4ff3399
2023-05-17 14:47 c_schmitz Note Added: 75032
2023-05-17 14:47 c_schmitz Bug heat 4 => 6
2023-05-17 14:47 c_schmitz Resolution open => fixed
2023-05-17 14:49 c_schmitz Status assigned => resolved
2023-05-17 14:49 c_schmitz Changeset attached => LimeSurvey master 5482c09e
2023-05-22 11:30 LimeBot Note Added: 75129
2023-05-22 11:30 LimeBot Status resolved => closed
2023-05-22 11:30 LimeBot Bug heat 6 => 8