View Issue Details

IDProjectCategoryView StatusLast Update
17362Bug reportsImport/Exportpublic2021-06-10 13:48
ReporterChristianJeske Assigned Toollehar  
PrioritynoneSeveritycrash 
Status closedResolutionno change required 
Product Version5.x 
Summary17362: PHP Error when importing a question group
DescriptionHello,

I want to create a loop for a series of questions-groups depending on how many children they have.

For that I need to export/import the question groups. For the first group it worked, after that I get an error message (see below). And the group gets created but with empty questions that can't be opened (it just loads and loads).

I also exported the whole thing and imported it again and tried it there, same error. Also regenerated the message codes.

I updated (using the delete everything except for the upload folder and confix.xml/security.xml files after taking over an 1.9x system with a lot of old stuff in there:


Database server info
Uptime: 6634252 Threads: 64 Questions: 2220995444 Slow queries: 38664423 Opens: 17752376 Flush tables: 1 Open tables: 1600 Queries per second avg: 334.777
Steps To ReproduceJust import the question-group with 5.0.2 or 5.0.3 and I get the error and it crashes with an empty group.

Database:

Data consistency check

If errors are showing up you might have to execute this script repeatedly.

    All conditions meet consistency standards.
    All question attributes meet consistency standards.
    All default values meet consistency standards.
    All quotas meet consistency standards.
    All quota language settings meet consistency standards.
    All quota quota members meet consistency standards.
    All assessments meet consistency standards.
    All answers meet consistency standards.
    All answers texts meet consistency standards.
    All surveys meet consistency standards.
    All survey language settings meet consistency standards.
    All questions meet consistency standards.
    All question texts meet consistency standards.
    No issues with question order found.
    All question groups meet consistency standards.
    All question group texts meet consistency standards.
    All groups meet consistency standards.
    No issues with question group order found.
    All old survey tables meet consistency standards.
    All old survey participants tables meet consistency standards.


No database action required!
Additional InformationPHP notice

Undefined index: help

/kunden/306065_70794/umfrage2/application/helpers/admin/import_helper.php(346)

334
335
336 // Import question_l10ns
337 if (isset($xml->question_l10ns->rows->row)) {
338 foreach ($xml->question_l10ns->rows->row as $row) {
339 $insertdata = array();
340 foreach ($row as $key => $value) {
341 $insertdata[(string) $key] = (string) $value;
342 }
343 unset($insertdata['id']);
344 // now translate any links
345 $insertdata['question'] = translateLinks('survey', $iOldSID, $iNewSID, $insertdata['question']);
346 $insertdata['help'] = translateLinks('survey', $iOldSID, $iNewSID, $insertdata['help']);
347 if (isset($aQIDReplacements[$insertdata['qid']])) {
348 $insertdata['qid'] = $aQIDReplacements[$insertdata['qid']];
349 } else {
350 continue; //Skip invalid group ID
351 }
352 $oQuestionL10n = new QuestionL10n();
353 $oQuestionL10n->setAttributes($insertdata, false);
354 $oQuestionL10n->save();
355 }
356 }
357
358 // Import answers ------------------------------------------------------------

TagsNo tags attached.
Complete LimeSurvey version number (& build) LimeSurvey Community Edition Version 5.0.3+210609
I will donate to the project if issue is resolvedNo
BrowserFirefox 80
Database & DB-Version10.4.17-MariaDB
Server OS (if known)Linux sh10364 3.10.0-1160.21.1.el7.x86_64
Webserver software & version (if known) Apache
PHP Version 7.4.19

Activities

ChristianJeske

ChristianJeske

2021-06-10 09:21

reporter  

limesurvey_group_1466.lsg (8,502 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<document>
 <LimeSurveyDocType>Group</LimeSurveyDocType>
 <DBVersion>449</DBVersion>
 <languages>
  <language>de</language>
 </languages>
 <groups>
  <fields>
   <fieldname>gid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>group_order</fieldname>
   <fieldname>randomization_group</fieldname>
   <fieldname>grelevance</fieldname>
  </fields>
  <rows>
   <row>
    <gid><![CDATA[1466]]></gid>
    <sid><![CDATA[598469]]></sid>
    <group_order><![CDATA[17]]></group_order>
    <randomization_group/>
    <grelevance><![CDATA[SELECTOR == "EL"]]></grelevance>
   </row>
  </rows>
 </groups>
 <group_l10ns>
  <fields>
   <fieldname>id</fieldname>
   <fieldname>gid</fieldname>
   <fieldname>group_name</fieldname>
   <fieldname>description</fieldname>
   <fieldname>language</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>group_order</fieldname>
   <fieldname>randomization_group</fieldname>
   <fieldname>grelevance</fieldname>
  </fields>
  <rows>
   <row>
    <id><![CDATA[784]]></id>
    <gid><![CDATA[1466]]></gid>
    <group_name><![CDATA[Fragen zum Fernunterricht]]></group_name>
    <description/>
    <language><![CDATA[de]]></language>
    <sid><![CDATA[598469]]></sid>
    <group_order><![CDATA[17]]></group_order>
    <randomization_group/>
    <grelevance><![CDATA[SELECTOR == "EL"]]></grelevance>
   </row>
  </rows>
 </group_l10ns>
 <questions>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>parent_qid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>gid</fieldname>
   <fieldname>type</fieldname>
   <fieldname>title</fieldname>
   <fieldname>preg</fieldname>
   <fieldname>other</fieldname>
   <fieldname>mandatory</fieldname>
   <fieldname>question_order</fieldname>
   <fieldname>scale_id</fieldname>
   <fieldname>same_default</fieldname>
   <fieldname>relevance</fieldname>
   <fieldname>modulename</fieldname>
   <fieldname>encrypted</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[28209]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[L]]></type>
    <title><![CDATA[r1009q0]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[S]]></mandatory>
    <question_order><![CDATA[1]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
   <row>
    <qid><![CDATA[28210]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[!]]></type>
    <title><![CDATA[r745q0]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[S]]></mandatory>
    <question_order><![CDATA[2]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
   <row>
    <qid><![CDATA[28211]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[L]]></type>
    <title><![CDATA[r736q0]]></title>
    <other><![CDATA[Y]]></other>
    <mandatory><![CDATA[S]]></mandatory>
    <question_order><![CDATA[3]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
   <row>
    <qid><![CDATA[28212]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[!]]></type>
    <title><![CDATA[r892q0]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[S]]></mandatory>
    <question_order><![CDATA[4]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
   <row>
    <qid><![CDATA[28213]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[L]]></type>
    <title><![CDATA[r608q0]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[S]]></mandatory>
    <question_order><![CDATA[5]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
   <row>
    <qid><![CDATA[28214]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[L]]></type>
    <title><![CDATA[r799q0]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <question_order><![CDATA[6]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
   <row>
    <qid><![CDATA[28215]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[L]]></type>
    <title><![CDATA[r79q0]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[S]]></mandatory>
    <question_order><![CDATA[7]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
   <row>
    <qid><![CDATA[28216]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[L]]></type>
    <title><![CDATA[r455q0]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[S]]></mandatory>
    <question_order><![CDATA[8]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
   <row>
    <qid><![CDATA[28217]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[F]]></type>
    <title><![CDATA[r817q0]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[Y]]></mandatory>
    <question_order><![CDATA[9]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
   <row>
    <qid><![CDATA[28218]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[F]]></type>
    <title><![CDATA[r940q0]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[Y]]></mandatory>
    <question_order><![CDATA[10]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
   <row>
    <qid><![CDATA[28219]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[F]]></type>
    <title><![CDATA[r406q0]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[Y]]></mandatory>
    <question_order><![CDATA[11]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
   <row>
    <qid><![CDATA[28220]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[598469]]></sid>
    <gid><![CDATA[1466]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[r813q0]]></title>
    <preg/>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[S]]></mandatory>
    <question_order><![CDATA[12]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
   </row>
  </rows>
 </questions>
</document>
limesurvey_group_1466.lsg (8,502 bytes)   
ChristianJeske

ChristianJeske

2021-06-10 09:24

reporter   ~64824

It has an error in line 346 for help text I guess? But the question group has no help text in any of the questions.
ChristianJeske

ChristianJeske

2021-06-10 11:29

reporter   ~64825

I created another installation for limesurvey. Other folder, clean empty database. Imported the questionnaire, imported the group. Works.

So something is wrong with my old database I guess. Or the config.xml file.
ollehar

ollehar

2021-06-10 12:35

administrator   ~64831

Let me test on my machine.
ollehar

ollehar

2021-06-10 13:48

administrator   ~64834

Worked for me. Will close this bug for now. Please re-open or create a new issue if you're having any other problems.
Selection_087.png (99,945 bytes)   
Selection_087.png (99,945 bytes)   

Issue History

Date Modified Username Field Change
2021-06-10 09:21 ChristianJeske New Issue
2021-06-10 09:21 ChristianJeske File Added: limesurvey_group_1466.lsg
2021-06-10 09:21 ChristianJeske File Added: limesurvey_survey_598469.lss
2021-06-10 09:24 ChristianJeske Note Added: 64824
2021-06-10 11:29 ChristianJeske Note Added: 64825
2021-06-10 12:35 ollehar Note Added: 64831
2021-06-10 13:48 ollehar Note Added: 64834
2021-06-10 13:48 ollehar File Added: Selection_087.png
2021-06-10 13:48 ollehar Assigned To => ollehar
2021-06-10 13:48 ollehar Status new => closed
2021-06-10 13:48 ollehar Resolution open => no change required