View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
09951Bug reportsRemoteControlpublic2016-01-22 08:54
Reportertomcat14 Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.06+ 
Fixed in Version2.06+ 
Summary09951: Remote import of zip file doesn't work
Description

When trying to import a zip file with the import_survey() function of the JSON/RPC remote control API the import fails.

Nothing happens, no error, you just get a zero integer value as a response.

The cause of this problem is that the import_survey() function expects 'zip' as an import datatype. The function then saves the import as a temporary file (with the zip-extension) and finally passes the file on to the function importSurveyFile(), which expects a lsa extension.

In short: the temporary file has an extension ".zip", so nothing gets imported because the import function itself expects ".lsa".

I fixed this by changing 'zip' to 'lsa' in the array where the import-datatype is validated.

file: LIMESURVEY_INSTALL/application/helpers/remotecontrol/remotecontrol_handle.php, line 212

...
if (!in_array($sImportDataType,array('lsa','csv','txt','lss')))
...

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)150930
I will donate to the project if issue is resolvedNo
Browser
Database type & version184
Server OS (if known)Windows
Webserver software & version (if known)Apache 2.x
PHP Version5.5.15

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2016-01-07 18:40

developer   ~34179

Great catch : can you make a pull request on github please ?

c_schmitz

c_schmitz

2016-01-08 15:47

administrator   ~34250

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

Related Changesets

LimeSurvey: master 0a502605

2016-01-08 14:42:17

c_schmitz

Details Diff
Fixed issue 09951: Remote import of survey archive doesn't work Affected Issues
09951
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

Issue History

Date Modified Username Field Change
2015-10-06 17:56 tomcat14 New Issue
2016-01-06 20:17 duvemyster Issue Monitored: duvemyster
2016-01-07 18:30 duvemyster Issue End Monitor: duvemyster
2016-01-07 18:40 DenisChenu Note Added: 34179
2016-01-08 15:40 c_schmitz Assigned To => c_schmitz
2016-01-08 15:40 c_schmitz Status new => assigned
2016-01-08 15:43 c_schmitz Status assigned => resolved
2016-01-08 15:43 c_schmitz Fixed in Version => 2.06+
2016-01-08 15:43 c_schmitz Resolution open => fixed
2016-01-08 15:47 c_schmitz Changeset attached => LimeSurvey master 0a502605
2016-01-08 15:47 c_schmitz Note Added: 34250
2016-01-22 08:54 c_schmitz Status resolved => closed