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
2 years 6 months ago #241148 by kappernet
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 5.6.4+230206
Own server or LimeSurvey hosting: own server (php 7.4.33, Apache/2.4.55, 5.5.5-10.5.18-MariaDB-0+deb11u1
Survey theme/template: Bootswatch Theme ( bootswatch)
==================
Hi,
we tried to copy a survey, this results for a specific survey in following error message: Failed to import survey language settings - data is invalid.
but limesurvey creates a new entry in survey list - one without a title.
Selecting this survey (without title) leads to following error message: 500: Interner Serverfehler - Selected Surveys language not found
(not matter if we use super user or another one)
copying a different survey works.
as a first step we changed php.ini settings:
memory_limit = 128M
-> memory_limit    = 256M
post_max_size = 16M
-> post_max_size = 128M

we activated debugging output
copying that survey shows:
/var/customers/webs/survey/latest/application/helpers/admin/import_helper.php(1423)

clicking on the new created empty-title survey:
/var/customers/webs/survey/latest/application/models/Survey.php(365)therefore i added
356 traceVar(App()->language);
357 traceVar($this->language);
358 traceVar($this->languagesettings);
which is shown as
10:35:03.127028tracevardump/var/customers/webs/survey/latest/application/models/Survey.php (356):
'de'10:35:03.127037tracevardump/var/customers/webs/survey/latest/application/models/Survey.php (357):
'de'10:35:03.127554tracevardump/var/customers/webs/survey/latest/application/models/Survey.php (358):
array()so
$this->languagesettingsseems to be an empty array - where does initialized? with which data?

anyone there who sees the problem an can help?

thx

Michael

 

Please Log in to join the conversation.

More
2 years 6 months ago #241151 by Joffm
What happens when you lss export this survey and import again?

If this also fails, please provide this lss here.

Joffm 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
2 years 6 months ago - 2 years 6 months ago #241155 by kappernet
hi,
same problem. error when importing an nameless survey in survey list. clicking the listitem shows error message.
survey.kapper.net/download/survey.zip

thx

Michael
 
Last edit: 2 years 6 months ago by kappernet.

Please Log in to join the conversation.

More
2 years 6 months ago #241162 by tpartner
I have no problem importing that survey into version 5.6.9. Try updating to the latest version and retesting.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
2 years 6 months ago #241165 by Joffm
And I do not see problems in an old 5.4.13. nor in 5.6.8.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
2 years 6 months ago #241170 by jelo

And I do not see problems in an old 5.4.13. nor in 5.6.8.
 
When trying to import that file in the demo installation (demo.limesurvey.org) (5.6.8), the error is:

500: Internal Server Error
Error while saving group: Array
(
[gid] => Array
(
[0] => Group ID (gid): “84” already set with language ”de”.
)
)

But the demo installation seldom works buggyfree when I try to import surveys there.

 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

More
2 years 6 months ago #241176 by kappernet
thank you all for comments!

after updating to Version 5.6.9+230306 copying this survey works as it shoud.

greetings from Vienna

Michael

Please Log in to join the conversation.

More
2 years 4 months ago #242671 by mhladun
I got the same issue when I tried importing a survey that I just exported. I imported the .lsa to a different LS instance running the same version of LS, 5.6.0, and it worked,

Please Log in to join the conversation.

More
2 years 3 months ago #243346 by Jameswalter
If you are encountering an error message that says "Failed to import survey language settings" when trying to import survey language settings on LimeSurvey, there are several possible reasons and solutions:

Incorrect File Format: The error can occur if the file format of the import file is incorrect. Make sure that the import file is in the correct format, which is a .csv file.

Incorrect File Encoding: The error can also occur if the file encoding of the import file is incorrect. Make sure that the import file is encoded in UTF-8, which is the default encoding for LimeSurvey.

Incorrect Column Headers: The error can occur if the column headers in the import file do not match the expected column headers. Make sure that the column headers in the import file match the column headers in the LimeSurvey survey language settings.

Please Log in to join the conversation.

More
2 years 3 months ago #243371 by DenisChenu
@Jameswalter : stop to use ChatGPT for your answers.

It's a non sense here

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

More
2 years 3 months ago #243494 by LarryF
We encountered the same problem on the 5.5.2 version :Failed to import survey language settings - data is invalid
I was able to import the survey into another identical instance though.
Once it was imported, i couldn't import it anymore on the second instance, which is probably what happened on the first instance too.
It looks like a conflict with the existing survey.

Please Log in to join the conversation.

More
2 years 3 months ago #243524 by DenisChenu

We encountered the same problem on the 5.5.2 version :Failed to import survey language settings - data is invalid
I was able to import the survey into another identical instance though.
Once it was imported, i couldn't import it anymore on the second instance, which is probably what happened on the first instance too.
It looks like a conflict with the existing survey.
 
Maybe need to be reported with the LSS and this details.

Can you activate ddebug mode on 2nd import ? www.limesurvey.org/manual/Debug_mode

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

More
2 years 3 months ago - 2 years 3 months 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:70.97 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: 2 years 3 months ago by LarryF.

Please Log in to join the conversation.

More
2 years 3 months 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 support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

More
2 years 3 months 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 support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose