Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Problem copying a specific survey | Failed to import survey language settings

More
1 year 3 days ago - 1 year 3 days ago #243529 by LarryF
Here is the result of the debug mode during the second import.
I have also attached an "emptied" version of the survey that still causes the error.

File Attachment:

File Name: limesurvey...rvey.lss
File Size:71 KB


ExceptionErreur: Failed to import survey language settings - data is invalid./var/www/html/survey/application/helpers/admin/import_helper.php(1423)1411 }
1412
1413 if (isset($insertdata) && substr($insertdata, 0, 1) != '{') {
1414 unset($insertdata);
1415 }
1416 $aColumns = SurveyLanguageSetting::model()->attributes;
1417 $insertdata = array_intersect_key($insertdata, $aColumns);
1418
1419 $surveyLanguageSetting = new SurveyLanguageSetting();
1420 $surveyLanguageSetting->setAttributes($insertdata, false);
1421 try {
1422 if (!$surveyLanguageSetting->save()) {
1423 throw new Exception(gT("Error") . ": Failed to import survey language settings - data is invalid.");
1424 }
1425 } catch (CDbException $e) {
1426 throw new Exception(gT("Error") . ": Failed to import survey language settings - data is invalid.");
1427 }
1428 }
1429
1430
1431 // Import groups table ===================================================================================
1432 if (isset($xml->groups->rows->row)) {
1433 foreach ($xml->groups->rows->row as $row) {
1434 $insertdata = array();
1435 foreach ($row as $key => $value) {
Stack Trace#0– /var/www/html/survey/application/helpers/admin/import_helper.php(1140): XMLImportSurvey()1135 } else {
1136 $sExtension = "";
1137 }
1138 switch ($sExtension) {
1139 case 'lss':
1140 $aImportResults = XMLImportSurvey($sFullFilePath, null, $sNewSurveyName, $DestSurveyID, $bTranslateLinksFields);
1141 if (!empty($aImportResults)) {
1142 $SurveyIntegrity = new LimeSurvey\Models\Services\SurveyIntegrity(Survey::model()->findByPk($aImportResults));
1143 $SurveyIntegrity->fixSurveyIntegrity();
1144 }
1145 return $aImportResults;
#1– /var/www/html/survey/application/controllers/SurveyAdministrationController.php(2159): importSurveyFile()2154
2155 // Now, we have the survey : start importing
2156 Yii::app()->loadHelper('admin/import');
2157
2158 if ($action == 'importsurvey' && !$aData) {
2159 $aImportResults = importSurveyFile($sFullFilepath, (Yii::app()->request->getPost('translinksfields') == '1'));
2160 if (is_null($aImportResults)) {
2161 $aImportResults = array(
2162 'error' => gT("Unknown error while reading the file, no survey created.")
2163 );
2164 }
#2+ /var/www/html/survey/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(49): SurveyAdministrationController->actionCopy() #3+ /var/www/html/survey/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams() #4+ /var/www/html/survey/vendor/yiisoft/yii/framework/web/CController.php(286): CController->runAction() #5+ /var/www/html/survey/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters() #6– /var/www/html/survey/application/controllers/LSBaseController.php(145): CController->run()140 $this->redirect(array('/admin/authentication/sa/login'));
141 }
142 }
143 }
144
145 parent::run($action);
146 }
147
148 /**
149 * Load and set session vars
150 *
#7+ /var/www/html/survey/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): LSBaseController->run() #8+ /var/www/html/survey/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController() #9+ /var/www/html/survey/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest() #10+ /var/www/html/survey/index.php(192): CApplication->run()
Last edit: 1 year 3 days ago by LarryF.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 days ago #243532 by DenisChenu
Arg

1. First issue : it don't work the secod time
2. 2nd issue : LimeSurey don't show error when try to save …

Please : report : community.limesurvey.org/bug-tracker/

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 days ago #243533 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose