View Issue Details

IDProjectCategoryView StatusLast Update
16474Bug reportsRemoteControlpublic2020-07-09 15:07
Reporterliantis_pieterjan Assigned To 
Status newResolutionopen 
Product Version4.3.1 
Summary16474: Remote control import_group broken

cross posting from the forum:

Hi I'm using LimeSurvey Version 4.3.1+200623

When trying to import an .lsg file I get the following response:

500: Internal Server Error
Too few arguments to function XMLImportGroup(), 2 passed in /var/www/html/application/helpers/remotecontrol/remotecontrol_handle.php on line 1123 and exactly 3 expected

I checked the code in github and it seems that back in April the XMLImportGroup in application/helpers/admin/import_helper.php was modified. Instead of 2 parameters it now has 3.

And questiongroups.php was modified to allow import via the website, but the remotecontrol_handle.php is still using only two parameters. Thus the import_group is broken.

Could someone verify these findings. And if correct, report this as an issue?

Best regards

Steps To Reproduce

call import_group on the remote control API

Tagsremote control
Complete LimeSurvey version number (& build)4.3.1+200623
I will donate to the project if issue is resolvedNo
Database & DB-VersionMariaDB 10.5.4
Server OS (if known)
Webserver software & version (if known)
PHP Version7.3.19




2020-07-09 13:43

reporter   ~58838

I fixed the issue in the latest version (Version 4.3.3+200707) locally.

I patched remotecontrol_handle.php at line 1123
$aImportResults = XMLImportGroup($sFullFilePath, $iSurveyID);

$aImportResults = XMLImportGroup($sFullFilePath, $iSurveyID, (App()->request->getPost('translinksfields') == '1'));

and afterwards the import_group remote control is functioning again.
Could someone integrate this fix? Not sure whether you guys could write a test on this. I don't have experience creating unit tests in PHP otherwise I'd do it.



2020-07-09 15:07

manager   ~58856

@ollehar? have time to take a look at the issue?

Thanks for report!

Issue History

Date Modified Username Field Change
2020-07-08 19:59 liantis_pieterjan New Issue
2020-07-09 13:43 liantis_pieterjan Note Added: 58838
2020-07-09 14:04 liantis_pieterjan Tag Attached: remote control
2020-07-09 15:07 cdorin Note Added: 58856