View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
18140Bug reports_ Unknownpublic2022-06-07 12:07
Reporterritapas Assigned ToDenisChenu  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.28.x 
Fixed in Version3.28.x 
Summary18140: cannot import vv file (with debug set)
Description

Importing a vv response file yelds a warning/error message. Responses are imported, anyway.

Steps To Reproduce

Steps to reproduce

Create a sample survey with a sample group and quesiton. Activate and add a couple of responses. Export responses as vv file. Import said vv file

Expected result

the first two responses are replicated

Actual result

i am shown an error messages. the first two responses are replicated, though
PHP warning

unlink(/var/www/limesurvey/tmp/ha9x8ktjh5s42zyqjg77): No such file or directory

/var/www/limesurvey/application/controllers/admin/dataentry.php(147)

135 $aOptions = array();
136 $aOptions['bDeleteFistLine'] = !(bool) Yii::app()->request->getPost('dontdeletefirstline');
137 if (Yii::app()->request->getPost('noid')) {
138 $aOptions['sExistingId'] = 'ignore';
139 } else {
140 $aOptions['sExistingId'] = Yii::app()->request->getPost('insertmethod');
141 }
142 $aOptions['bNotFinalized'] = (bool) Yii::app()->request->getPost('notfinalized');
143 $aOptions['bForceImport'] = (bool) Yii::app()->request->getPost('forceimport');
144 $aOptions['sCharset'] = Yii::app()->request->getPost('vvcharset');
145 $aOptions['sSeparator'] = "\t";
146 $aResult = CSVImportResponses($filePath, $iSurveyId, $aOptions);
147 unlink($filePath); //delete the uploaded file
148 $aData['class'] = "";
149 $aData['title'] = gT("Import a VV response data file");
150 $aData['aResult']['success'][] = gT("File upload succeeded.");
151 if (isset($aResult['success'])) {
152 $aData['aResult']['success'] = array_merge($aData['aResult']['success'], $aResult['success']);
153 }
154 if (isset($aResult['warnings'])) {
155 $aData['class'] = "message-box-warning";
156 }
157 if (isset($aResult['errors'])) {
158 $aData['class'] = "message-box-error";
159 }

Stack Trace
#0

/var/www/limesurvey/application/controllers/admin/dataentry.php(147): unlink("/var/www/limesurvey/tmp/ha9x8ktjh5s42zyqjg77")

142 $aOptions['bNotFinalized'] = (bool) Yii::app()->request->getPost('notfinalized');
143 $aOptions['bForceImport'] = (bool) Yii::app()->request->getPost('forceimport');
144 $aOptions['sCharset'] = Yii::app()->request->getPost('vvcharset');
145 $aOptions['sSeparator'] = "\t";
146 $aResult = CSVImportResponses($filePath, $iSurveyId, $aOptions);
147 unlink($filePath); //delete the uploaded file
148 $aData['class'] = "";
149 $aData['title'] = gT("Import a VV response data file");
150 $aData['aResult']['success'][] = gT("File upload succeeded.");
151 if (isset($aResult['success'])) {
152 $aData['aResult']['success'] = array_merge($aData['aResult']['success'], $aResult['success']);

#1

/var/www/limesurvey/application/controllers/admin/dataentry.php(96): dataentry->_handleFileUpload("736317", array("display" => array("menu_bars" => array("browse" => "Data entry")), "title_bar" => array("title" => "Data entry"), "sidemenu" => array("state" => false), "menu" => array("edition" => true, "import" => true, "close" => true), ...))

091
092 $subAction = Yii::app()->request->getPost('subaction');
093 if ($subAction != "upload") {
094 $this->_showUploadForm($this->_getEncodingsArray(), $iSurveyId, $aData);
095 } else {
096 $this->_handleFileUpload($iSurveyId, $aData);
097 }
098 } else {
099 Yii::app()->session['flashmessage'] = gT("This survey is not active. You must activate the survey before attempting to import a VVexport file.");
100 $this->getController()->redirect($this->getController()->createUrl("/admin/survey/sa/view/surveyid/{$iSurveyId}"));
101 }

#2
unknown(0): dataentry->vvimport()
#3
+
/var/www/limesurvey/framework/web/actions/CAction.php(115): ReflectionMethod->invokeArgs(dataentry, array())
#4

/var/www/limesurvey/application/core/Survey_Common_Action.php(83): CAction->runWithParamsInternal(dataentry, ReflectionMethod, array("surveyid" => "736317", "sa" => "vvimport", "iSurveyId" => "736317", "iSurveyID" => "736317", ...))

78 $oMethod = new ReflectionMethod($this, $sDefault);
79 }
80
81 // We're all good to go, let's execute it
82 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
83 return parent::runWithParamsInternal($this, $oMethod, $params);
84 }
85
86 /*
87
Some functions have different parameters, which are just an alias of the
88 * usual parameters we're getting in the url. This function just populates

#5
+
/var/www/limesurvey/framework/web/CController.php(308): Survey_Common_Action->runWithParams(array("surveyid" => "736317", "sa" => "vvimport", "iSurveyId" => "736317", "iSurveyID" => "736317", ...))
#6
+
/var/www/limesurvey/framework/web/CController.php(286): CController->runAction(dataentry)
#7
+
/var/www/limesurvey/framework/web/CController.php(265): CController->runActionWithFilters(dataentry, array())
#8
+
/var/www/limesurvey/application/controllers/AdminController.php(165): CController->run("dataentry")
#9
+
/var/www/limesurvey/framework/web/CWebApplication.php(282): AdminController->run("dataentry")
#10
+
/var/www/limesurvey/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/dataentry/sa/vvimport")
#11
+
/var/www/limesurvey/framework/base/CApplication.php(185): CWebApplication->processRequest()
#12
+
/var/www/limesurvey/index.php(194): CApplication->run()

doesn't happen in v. 3.28.11 In which files is this fixed ?

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)3.28.8 (build 220426)
I will donate to the project if issue is resolvedNo
BrowserMozilla Firefox
Database type & versionphp-mysql-5.4.16
Server OS (if known)Red Hat Enterprise Linux Server release 7.5 (Maipo)
Webserver software & version (if known)httpd-2.4.6-80
PHP Versionrh-php71

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

ritapas

ritapas

2022-05-23 01:39

reporter  

error_import_vv_file.png (166,087 bytes)
DenisChenu

DenisChenu

2022-06-06 09:02

developer   ~70225

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=33562

LimeBot

LimeBot

2022-06-07 12:07

administrator   ~70266

Fixed in Release 3.28.14+220608

Related Changesets

LimeSurvey: master 53780f36

2022-06-03 15:25:54

DenisChenu

Details Diff
Dev: issue 18140 add comment about CSV file deletion Affected Issues
18140
mod - application/helpers/admin/import_helper.php Diff File

LimeSurvey: 3.x-LTS 4bea7d6c

2022-06-06 09:02:23

DenisChenu


Committer: GitHub Details Diff
Fixed issue 18140: cannot import vv file (with debug set) (#2453)

Dev: remove uneeded unlink and add comment in function
Affected Issues
18140
mod - application/controllers/admin/dataentry.php Diff File
mod - application/helpers/admin/import_helper.php Diff File

Issue History

Date Modified Username Field Change
2022-05-23 01:39 ritapas New Issue
2022-05-23 01:39 ritapas File Added: error_import_vv_file.png
2022-05-23 09:03 DenisChenu Assigned To => DenisChenu
2022-05-23 09:03 DenisChenu Status new => assigned
2022-06-03 15:02 DenisChenu Summary cannot import vv file => cannot import vv file (with debug set)
2022-06-03 15:26 DenisChenu Changeset attached => LimeSurvey master 53780f36
2022-06-06 09:02 DenisChenu Changeset attached => LimeSurvey 3.x-LTS 4bea7d6c
2022-06-06 09:02 DenisChenu Note Added: 70225
2022-06-06 09:02 DenisChenu Bug heat 0 => 2
2022-06-06 09:02 DenisChenu Resolution open => fixed
2022-06-06 09:02 DenisChenu Status assigned => resolved
2022-06-06 09:02 DenisChenu Fixed in Version => 3.28.x
2022-06-07 12:07 LimeBot Note Added: 70266
2022-06-07 12:07 LimeBot Status resolved => closed
2022-06-07 12:07 LimeBot Bug heat 2 => 4