View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
18323Bug reportsSurvey editingpublic2022-10-12 01:31
Reporterfrancois-charles.hebert Assigned Togabrieljenik  
PriorityhighSeveritypartial_block 
Status closedResolutionfixed 
Product Version5.3.x 
Summary18323: When copying a question with sub-questions, the sub-questions are not copied
Description

I tried to copy a question that has sub-questions (type F aka array), and I found a bug that was not there in the V3:
If the sub-questions code begins with a number, the sub-questions are not copied with the questions. I tried to change the sub-questions code so it begins with a letter, and the problem does not occur.

Besides that, the problems does not occur with the answers options. With those, the code can begins with a letter or a number without any problems.

I did not found any naming conventions for the codes, so I figured it was a bug. Also, no errors are shown.

Steps To Reproduce

Steps to reproduce

Create a question which has subquestions (like multiple or array) and then create subquestions with code beginning with a number.
For example:
code: 1
Question: tests.....

Next, save the question then use the copy feature from the tools dropdown menu. Make sure the options "Copy subquestions" and "copy answers"are checked. then hit the "save and close" button.

Expected result

he questions is copied successfully, with all its answers options and subquestions.

Actual result

The question is copied, but not its subquestions.

TagsNo tags attached.
Attached Files
limesurvey_survey_638133.lss (35,110 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<document>
 <LimeSurveyDocType>Survey</LimeSurveyDocType>
 <DBVersion>487</DBVersion>
 <languages>
  <language>en</language>
 </languages>
 <answers>
  <fields>
   <fieldname>aid</fieldname>
   <fieldname>qid</fieldname>
   <fieldname>code</fieldname>
   <fieldname>sortorder</fieldname>
   <fieldname>assessment_value</fieldname>
   <fieldname>scale_id</fieldname>
  </fields>
  <rows>
   <row>
    <aid><![CDATA[483]]></aid>
    <qid><![CDATA[414]]></qid>
    <code><![CDATA[1]]></code>
    <sortorder><![CDATA[0]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
   <row>
    <aid><![CDATA[484]]></aid>
    <qid><![CDATA[414]]></qid>
    <code><![CDATA[2]]></code>
    <sortorder><![CDATA[1]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
   <row>
    <aid><![CDATA[485]]></aid>
    <qid><![CDATA[414]]></qid>
    <code><![CDATA[3]]></code>
    <sortorder><![CDATA[2]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
  </rows>
 </answers>
 <answer_l10ns>
  <fields>
   <fieldname>id</fieldname>
   <fieldname>aid</fieldname>
   <fieldname>answer</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <id><![CDATA[971]]></id>
    <aid><![CDATA[483]]></aid>
    <answer><![CDATA[answer test 1]]></answer>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[972]]></id>
    <aid><![CDATA[484]]></aid>
    <answer><![CDATA[answer test 2]]></answer>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[973]]></id>
    <aid><![CDATA[485]]></aid>
    <answer><![CDATA[answer test 3]]></answer>
    <language><![CDATA[en]]></language>
   </row>
  </rows>
 </answer_l10ns>
 <groups>
  <fields>
   <fieldname>gid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>group_order</fieldname>
   <fieldname>randomization_group</fieldname>
   <fieldname>grelevance</fieldname>
  </fields>
  <rows>
   <row>
    <gid><![CDATA[34]]></gid>
    <sid><![CDATA[638133]]></sid>
    <group_order><![CDATA[1]]></group_order>
    <randomization_group/>
    <grelevance><![CDATA[1]]></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[64]]></id>
    <gid><![CDATA[34]]></gid>
    <group_name><![CDATA[With Sub-questions]]></group_name>
    <description/>
    <language><![CDATA[en]]></language>
    <sid><![CDATA[638133]]></sid>
    <group_order><![CDATA[1]]></group_order>
    <randomization_group/>
    <grelevance><![CDATA[1]]></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>encrypted</fieldname>
   <fieldname>question_order</fieldname>
   <fieldname>scale_id</fieldname>
   <fieldname>same_default</fieldname>
   <fieldname>relevance</fieldname>
   <fieldname>question_theme_name</fieldname>
   <fieldname>modulename</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[410]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[638133]]></sid>
    <gid><![CDATA[34]]></gid>
    <type><![CDATA[M]]></type>
    <title><![CDATA[Multiple]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[1]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[multiplechoice]]></question_theme_name>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[638133]]></sid>
    <gid><![CDATA[34]]></gid>
    <type><![CDATA[F]]></type>
    <title><![CDATA[Array]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[2]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[arrays/array]]></question_theme_name>
    <modulename/>
   </row>
  </rows>
 </questions>
 <subquestions>
  <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>encrypted</fieldname>
   <fieldname>question_order</fieldname>
   <fieldname>scale_id</fieldname>
   <fieldname>same_default</fieldname>
   <fieldname>relevance</fieldname>
   <fieldname>question_theme_name</fieldname>
   <fieldname>modulename</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[411]]></qid>
    <parent_qid><![CDATA[410]]></parent_qid>
    <sid><![CDATA[638133]]></sid>
    <gid><![CDATA[34]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[1]]></title>
    <other><![CDATA[N]]></other>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[0]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
   </row>
   <row>
    <qid><![CDATA[412]]></qid>
    <parent_qid><![CDATA[410]]></parent_qid>
    <sid><![CDATA[638133]]></sid>
    <gid><![CDATA[34]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[2]]></title>
    <other><![CDATA[N]]></other>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[1]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
   </row>
   <row>
    <qid><![CDATA[418]]></qid>
    <parent_qid><![CDATA[414]]></parent_qid>
    <sid><![CDATA[638133]]></sid>
    <gid><![CDATA[34]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[10]]></title>
    <other><![CDATA[N]]></other>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[0]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
   </row>
   <row>
    <qid><![CDATA[419]]></qid>
    <parent_qid><![CDATA[414]]></parent_qid>
    <sid><![CDATA[638133]]></sid>
    <gid><![CDATA[34]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[11]]></title>
    <other><![CDATA[N]]></other>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[1]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
   </row>
  </rows>
 </subquestions>
 <question_l10ns>
  <fields>
   <fieldname>id</fieldname>
   <fieldname>qid</fieldname>
   <fieldname>question</fieldname>
   <fieldname>help</fieldname>
   <fieldname>script</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <id><![CDATA[817]]></id>
    <qid><![CDATA[410]]></qid>
    <question><![CDATA[A first example question. Please answer this question:]]></question>
    <help><![CDATA[This is a question help text.]]></help>
    <script/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[818]]></id>
    <qid><![CDATA[411]]></qid>
    <question><![CDATA[Subquestion 1]]></question>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[819]]></id>
    <qid><![CDATA[412]]></qid>
    <question><![CDATA[subquestion 2]]></question>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[821]]></id>
    <qid><![CDATA[414]]></qid>
    <question><![CDATA[Testing the array type with subquestions.]]></question>
    <help/>
    <script/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[825]]></id>
    <qid><![CDATA[418]]></qid>
    <question><![CDATA[test 1]]></question>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[826]]></id>
    <qid><![CDATA[419]]></qid>
    <question><![CDATA[test 2]]></question>
    <language><![CDATA[en]]></language>
   </row>
  </rows>
 </question_l10ns>
 <question_attributes>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>attribute</fieldname>
   <fieldname>value</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[altExcludeMultiple]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[array_filter]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[array_filter_exclude]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[array_filter_style]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[assessment_value]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[clear_default]]></attribute>
    <value><![CDATA[N]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[cssclass]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[display_columns]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[em_validation_q]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[em_validation_q_tip]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[exclude_all_others]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[exclude_all_others_auto]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[hidden]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[hide_tip]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[max_answers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[min_answers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[moveSomeAnswers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[other_numbers_only]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[other_position]]></attribute>
    <value><![CDATA[end]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[other_position_code]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[other_replace_text]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[page_break]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[printable_help]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[public_statistics]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[random_group]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[random_order]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[reorderAnswers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[save_as_default]]></attribute>
    <value><![CDATA[N]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[scale_export]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[statistics_graphtype]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[statistics_showgraph]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[410]]></qid>
    <attribute><![CDATA[subHeadingInList]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[answer_width]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[array_filter]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[array_filter_exclude]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[array_filter_style]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[clear_default]]></attribute>
    <value><![CDATA[N]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[cssclass]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[em_validation_q]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[em_validation_q_tip]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[exclude_all_others]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[hidden]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[hide_tip]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[max_answers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[min_answers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[page_break]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[printable_help]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[public_statistics]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[random_group]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[random_order]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[reorderAnswers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[repeat_headings]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[save_as_default]]></attribute>
    <value><![CDATA[N]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[scale_export]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[statistics_graphtype]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[statistics_showgraph]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[414]]></qid>
    <attribute><![CDATA[use_dropdown]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
  </rows>
 </question_attributes>
 <surveys>
  <fields>
   <fieldname>sid</fieldname>
   <fieldname>gsid</fieldname>
   <fieldname>admin</fieldname>
   <fieldname>expires</fieldname>
   <fieldname>startdate</fieldname>
   <fieldname>adminemail</fieldname>
   <fieldname>anonymized</fieldname>
   <fieldname>faxto</fieldname>
   <fieldname>format</fieldname>
   <fieldname>savetimings</fieldname>
   <fieldname>template</fieldname>
   <fieldname>language</fieldname>
   <fieldname>additional_languages</fieldname>
   <fieldname>datestamp</fieldname>
   <fieldname>usecookie</fieldname>
   <fieldname>allowregister</fieldname>
   <fieldname>allowsave</fieldname>
   <fieldname>autonumber_start</fieldname>
   <fieldname>autoredirect</fieldname>
   <fieldname>allowprev</fieldname>
   <fieldname>printanswers</fieldname>
   <fieldname>ipaddr</fieldname>
   <fieldname>ipanonymize</fieldname>
   <fieldname>refurl</fieldname>
   <fieldname>showsurveypolicynotice</fieldname>
   <fieldname>publicstatistics</fieldname>
   <fieldname>publicgraphs</fieldname>
   <fieldname>listpublic</fieldname>
   <fieldname>htmlemail</fieldname>
   <fieldname>sendconfirmation</fieldname>
   <fieldname>tokenanswerspersistence</fieldname>
   <fieldname>assessments</fieldname>
   <fieldname>usecaptcha</fieldname>
   <fieldname>usetokens</fieldname>
   <fieldname>bounce_email</fieldname>
   <fieldname>attributedescriptions</fieldname>
   <fieldname>emailresponseto</fieldname>
   <fieldname>emailnotificationto</fieldname>
   <fieldname>tokenlength</fieldname>
   <fieldname>showxquestions</fieldname>
   <fieldname>showgroupinfo</fieldname>
   <fieldname>shownoanswer</fieldname>
   <fieldname>showqnumcode</fieldname>
   <fieldname>bouncetime</fieldname>
   <fieldname>bounceprocessing</fieldname>
   <fieldname>bounceaccounttype</fieldname>
   <fieldname>bounceaccounthost</fieldname>
   <fieldname>bounceaccountpass</fieldname>
   <fieldname>bounceaccountencryption</fieldname>
   <fieldname>bounceaccountuser</fieldname>
   <fieldname>showwelcome</fieldname>
   <fieldname>showprogress</fieldname>
   <fieldname>questionindex</fieldname>
   <fieldname>navigationdelay</fieldname>
   <fieldname>nokeyboard</fieldname>
   <fieldname>alloweditaftercompletion</fieldname>
   <fieldname>googleanalyticsstyle</fieldname>
   <fieldname>googleanalyticsapikey</fieldname>
   <fieldname>tokenencryptionoptions</fieldname>
  </fields>
  <rows>
   <row>
    <sid><![CDATA[638133]]></sid>
    <gsid><![CDATA[1]]></gsid>
    <admin><![CDATA[inherit]]></admin>
    <adminemail><![CDATA[inherit]]></adminemail>
    <anonymized><![CDATA[N]]></anonymized>
    <format><![CDATA[I]]></format>
    <savetimings><![CDATA[I]]></savetimings>
    <template><![CDATA[inherit]]></template>
    <language><![CDATA[en]]></language>
    <additional_languages/>
    <datestamp><![CDATA[I]]></datestamp>
    <usecookie><![CDATA[I]]></usecookie>
    <allowregister><![CDATA[I]]></allowregister>
    <allowsave><![CDATA[I]]></allowsave>
    <autonumber_start><![CDATA[0]]></autonumber_start>
    <autoredirect><![CDATA[I]]></autoredirect>
    <allowprev><![CDATA[I]]></allowprev>
    <printanswers><![CDATA[I]]></printanswers>
    <ipaddr><![CDATA[I]]></ipaddr>
    <ipanonymize><![CDATA[I]]></ipanonymize>
    <refurl><![CDATA[I]]></refurl>
    <showsurveypolicynotice><![CDATA[0]]></showsurveypolicynotice>
    <publicstatistics><![CDATA[I]]></publicstatistics>
    <publicgraphs><![CDATA[I]]></publicgraphs>
    <listpublic><![CDATA[I]]></listpublic>
    <htmlemail><![CDATA[I]]></htmlemail>
    <sendconfirmation><![CDATA[I]]></sendconfirmation>
    <tokenanswerspersistence><![CDATA[I]]></tokenanswerspersistence>
    <assessments><![CDATA[I]]></assessments>
    <usecaptcha><![CDATA[E]]></usecaptcha>
    <usetokens><![CDATA[N]]></usetokens>
    <bounce_email><![CDATA[inherit]]></bounce_email>
    <emailresponseto><![CDATA[inherit]]></emailresponseto>
    <emailnotificationto><![CDATA[inherit]]></emailnotificationto>
    <tokenlength><![CDATA[-1]]></tokenlength>
    <showxquestions><![CDATA[I]]></showxquestions>
    <showgroupinfo><![CDATA[I]]></showgroupinfo>
    <shownoanswer><![CDATA[I]]></shownoanswer>
    <showqnumcode><![CDATA[I]]></showqnumcode>
    <bounceprocessing><![CDATA[N]]></bounceprocessing>
    <showwelcome><![CDATA[I]]></showwelcome>
    <showprogress><![CDATA[I]]></showprogress>
    <questionindex><![CDATA[-1]]></questionindex>
    <navigationdelay><![CDATA[-1]]></navigationdelay>
    <nokeyboard><![CDATA[I]]></nokeyboard>
    <alloweditaftercompletion><![CDATA[I]]></alloweditaftercompletion>
    <tokenencryptionoptions/>
   </row>
  </rows>
 </surveys>
 <surveys_languagesettings>
  <fields>
   <fieldname>surveyls_survey_id</fieldname>
   <fieldname>surveyls_language</fieldname>
   <fieldname>surveyls_title</fieldname>
   <fieldname>surveyls_description</fieldname>
   <fieldname>surveyls_welcometext</fieldname>
   <fieldname>surveyls_endtext</fieldname>
   <fieldname>surveyls_policy_notice</fieldname>
   <fieldname>surveyls_policy_error</fieldname>
   <fieldname>surveyls_policy_notice_label</fieldname>
   <fieldname>surveyls_url</fieldname>
   <fieldname>surveyls_urldescription</fieldname>
   <fieldname>surveyls_email_invite_subj</fieldname>
   <fieldname>surveyls_email_invite</fieldname>
   <fieldname>surveyls_email_remind_subj</fieldname>
   <fieldname>surveyls_email_remind</fieldname>
   <fieldname>surveyls_email_register_subj</fieldname>
   <fieldname>surveyls_email_register</fieldname>
   <fieldname>surveyls_email_confirm_subj</fieldname>
   <fieldname>surveyls_email_confirm</fieldname>
   <fieldname>surveyls_dateformat</fieldname>
   <fieldname>surveyls_attributecaptions</fieldname>
   <fieldname>email_admin_notification_subj</fieldname>
   <fieldname>email_admin_notification</fieldname>
   <fieldname>email_admin_responses_subj</fieldname>
   <fieldname>email_admin_responses</fieldname>
   <fieldname>surveyls_numberformat</fieldname>
   <fieldname>attachments</fieldname>
  </fields>
  <rows>
   <row>
    <surveyls_survey_id><![CDATA[638133]]></surveyls_survey_id>
    <surveyls_language><![CDATA[en]]></surveyls_language>
    <surveyls_title><![CDATA[Survey for testing the copy feature.]]></surveyls_title>
    <surveyls_description/>
    <surveyls_welcometext/>
    <surveyls_endtext/>
    <surveyls_policy_notice/>
    <surveyls_policy_notice_label/>
    <surveyls_url/>
    <surveyls_urldescription/>
    <surveyls_email_invite_subj><![CDATA[Invitation to participate in a survey]]></surveyls_email_invite_subj>
    <surveyls_email_invite><![CDATA[Dear {FIRSTNAME},<br />
<br />
you have been invited to participate in a survey.<br />
<br />
The survey is titled:<br />
"{SURVEYNAME}"<br />
<br />
"{SURVEYDESCRIPTION}"<br />
<br />
To participate, please click on the link below.<br />
<br />
Sincerely,<br />
<br />
{ADMINNAME} ({ADMINEMAIL})<br />
<br />
----------------------------------------------<br />
Click here to do the survey:<br />
{SURVEYURL}<br />
<br />
If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:<br />
{OPTOUTURL}<br />
<br />
If you are blacklisted but want to participate in this survey and want to receive invitations please click the following link:<br />
{OPTINURL}]]></surveyls_email_invite>
    <surveyls_email_remind_subj><![CDATA[Reminder to participate in a survey]]></surveyls_email_remind_subj>
    <surveyls_email_remind><![CDATA[Dear {FIRSTNAME},<br />
<br />
Recently we invited you to participate in a survey.<br />
<br />
We note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part.<br />
<br />
The survey is titled:<br />
"{SURVEYNAME}"<br />
<br />
"{SURVEYDESCRIPTION}"<br />
<br />
To participate, please click on the link below.<br />
<br />
Sincerely,<br />
<br />
{ADMINNAME} ({ADMINEMAIL})<br />
<br />
----------------------------------------------<br />
Click here to do the survey:<br />
{SURVEYURL}<br />
<br />
If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:<br />
{OPTOUTURL}]]></surveyls_email_remind>
    <surveyls_email_register_subj><![CDATA[Survey registration confirmation]]></surveyls_email_register_subj>
    <surveyls_email_register><![CDATA[Dear {FIRSTNAME},<br />
<br />
You, or someone using your email address, have registered to participate in an online survey titled {SURVEYNAME}.<br />
<br />
To complete this survey, click on the following URL:<br />
<br />
{SURVEYURL}<br />
<br />
If you have any questions about this survey, or if you did not register to participate and believe this email is in error, please contact {ADMINNAME} at {ADMINEMAIL}.]]></surveyls_email_register>
    <surveyls_email_confirm_subj><![CDATA[Confirmation of your participation in our survey]]></surveyls_email_confirm_subj>
    <surveyls_email_confirm><![CDATA[Dear {FIRSTNAME},<br />
<br />
this email is to confirm that you have completed the survey titled {SURVEYNAME} and your response has been saved. Thank you for participating.<br />
<br />
If you have any further questions about this email, please contact {ADMINNAME} on {ADMINEMAIL}.<br />
<br />
Sincerely,<br />
<br />
{ADMINNAME}]]></surveyls_email_confirm>
    <surveyls_dateformat><![CDATA[9]]></surveyls_dateformat>
    <email_admin_notification_subj><![CDATA[Response submission for survey {SURVEYNAME}]]></email_admin_notification_subj>
    <email_admin_notification><![CDATA[Hello,<br />
<br />
A new response was submitted for your survey '{SURVEYNAME}'.<br />
<br />
Click the following link to see the individual response:<br />
{VIEWRESPONSEURL}<br />
<br />
Click the following link to edit the individual response:<br />
{EDITRESPONSEURL}<br />
<br />
View statistics by clicking here:<br />
{STATISTICSURL}]]></email_admin_notification>
    <email_admin_responses_subj><![CDATA[Response submission for survey {SURVEYNAME} with results]]></email_admin_responses_subj>
    <email_admin_responses><![CDATA[Hello,<br />
<br />
A new response was submitted for your survey '{SURVEYNAME}'.<br />
<br />
Click the following link to see the individual response:<br />
{VIEWRESPONSEURL}<br />
<br />
Click the following link to edit the individual response:<br />
{EDITRESPONSEURL}<br />
<br />
View statistics by clicking here:<br />
{STATISTICSURL}<br />
<br />
<br />
The following answers were given by the participant:<br />
{ANSWERTABLE}]]></email_admin_responses>
    <surveyls_numberformat><![CDATA[0]]></surveyls_numberformat>
   </row>
  </rows>
 </surveys_languagesettings>
 <themes>
  <theme>
   <sid>638133</sid>
   <template_name>configurable_theme</template_name>
   <config>
    <options>inherit</options>
   </config>
  </theme>
 </themes>
 <themes_inherited>
  <theme>
   <sid>638133</sid>
   <template_name>configurable_theme</template_name>
   <config>
    <options>
     <ajaxmode>off</ajaxmode>
     <hideprivacyinfo>off</hideprivacyinfo>
     <langswitcher>on</langswitcher>
     <progressbar>on</progressbar>
     <container>on</container>
     <showpopups>1</showpopups>
     <headeroption>off</headeroption>
     <publicstats>off</publicstats>
     <og_meta>on</og_meta>
     <og_type>website</og_type>
     <header>on</header>
     <headerwidth>container</headerwidth>
     <headerfontcolor>#000000</headerfontcolor>
     <headerbackgroundcolor>#FFFFFF</headerbackgroundcolor>
     <headerheight>none</headerheight>
     <brandlogo>off</brandlogo>
     <logoalign>left</logoalign>
     <logolink>#</logolink>
     <brandlogofilefr>./files/logo.png</brandlogofilefr>
     <brandlogofileen>./files/logo.png</brandlogofileen>
     <banner>on</banner>
     <banneralign>center</banneralign>
     <bannerbgcolor>#445460</bannerbgcolor>
     <bannerfontcolor>#FFFFFF</bannerfontcolor>
     <bannermaxheight>none</bannermaxheight>
     <bannerfile>./files/banner.png</bannerfile>
     <bannerfilemd>./files/head_800x220_fr.png</bannerfilemd>
     <bannerfilexs>./files/head_320x220_fr.png</bannerfilexs>
     <bannerfileen>./files/banner-en.png</bannerfileen>
     <bannerfilemden>./files/head_800x220.png</bannerfilemden>
     <bannerfilexsen>./files/head_320x220.png</bannerfilexsen>
     <progressbarheight>20px</progressbarheight>
     <progressbarfontsize>12px</progressbarfontsize>
     <progressbarfontweight>normal</progressbarfontweight>
     <progressbarborderradius>4px</progressbarborderradius>
     <backgroundimage>off</backgroundimage>
     <backgroundimagefile>./files/pattern.png</backgroundimagefile>
     <bodybackgroundcolor>#ffffff</bodybackgroundcolor>
     <fontcolor>#445460</fontcolor>
     <primarycolor>#445460</primarycolor>
     <primarycolordarker>#5ba03e</primarycolordarker>
     <requiredasterisk>off</requiredasterisk>
     <zebrastriping>off</zebrastriping>
     <stickymatrixheaders>off</stickymatrixheaders>
     <questionborder>off</questionborder>
     <crosshover>off</crosshover>
     <questioncontainershadow>on</questioncontainershadow>
     <greyoutselected>off</greyoutselected>
     <questionbackgroundcolor>#ffffff</questionbackgroundcolor>
     <checkicon>f00c</checkicon>
     <questionfontsize>16px</questionfontsize>
     <questionfontweight>normal</questionfontweight>
     <questioncolor>#445460</questioncolor>
     <answerfontsize>18px</answerfontsize>
     <answerfontweight>500</answerfontweight>
     <answercolor>#445460</answercolor>
     <linksfontweight>normal</linksfontweight>
     <linkscolor>#0000EE</linkscolor>
     <linkshovercolor>#0000EE</linkshovercolor>
     <linksvisitedcolor>#551A8B</linksvisitedcolor>
     <linksunderline>on</linksunderline>
     <linksunderlinehover>on</linksunderlinehover>
     <linksunderlinevisited>on</linksunderlinevisited>
     <btnprimaryfontcolor>#ffffff</btnprimaryfontcolor>
     <btnprimarybgcolor>#445460</btnprimarybgcolor>
     <btnprimarybordercolor>#445460</btnprimarybordercolor>
     <btnprimaryfonthovercolor>#ffffff</btnprimaryfonthovercolor>
     <btnprimarybghovercolor>#5ba03e</btnprimarybghovercolor>
     <btnprimaryborderhovercolor>#5ba03e</btnprimaryborderhovercolor>
     <btnprimarybordersize>1px</btnprimarybordersize>
     <btnprimaryradius>4px</btnprimaryradius>
     <btnsecondfontcolor>#445460</btnsecondfontcolor>
     <btnsecondbgcolor>#ffffff</btnsecondbgcolor>
     <btnsecondbordercolor>#445460</btnsecondbordercolor>
     <btnsecondfonthovercolor>#ffffff</btnsecondfonthovercolor>
     <btnsecondbghovercolor>#445460</btnsecondbghovercolor>
     <btnsecondborderhovercolor>#445460</btnsecondborderhovercolor>
     <btnsecondbordersize>1px</btnsecondbordersize>
     <btnsecondradius>4px</btnsecondradius>
     <btnprevfontcolor>#445460</btnprevfontcolor>
     <btnprevbgcolor>#ffffff</btnprevbgcolor>
     <btnprevbordercolor>#445460</btnprevbordercolor>
     <btnprevfonthovercolor>#ffffff</btnprevfonthovercolor>
     <btnprevbghovercolor>#445460</btnprevbghovercolor>
     <btnprevborderhovercolor>#445460</btnprevborderhovercolor>
     <btnprevbordersize>1px</btnprevbordersize>
     <btnprevradius>6px</btnprevradius>
     <btnnextfontcolor>#ffffff</btnnextfontcolor>
     <btnnextbgcolor>#445460</btnnextbgcolor>
     <btnnextbordercolor>#445460</btnnextbordercolor>
     <btnnextfonthovercolor>#ffffff</btnnextfonthovercolor>
     <btnnextbghovercolor>#5ba03e</btnnextbghovercolor>
     <btnnextborderhovercolor>#5ba03e</btnnextborderhovercolor>
     <btnnextbordersize>1px</btnnextbordersize>
     <btnnextradius>6px</btnnextradius>
     <footer>on</footer>
     <stickyfooter>on</stickyfooter>
     <logofooter>on</logofooter>
     <footerbgcolor>#445460</footerbgcolor>
     <footerfontcolor>#FFFFFF</footerfontcolor>
     <footerfontsize>14px</footerfontsize>
     <footerfontweight>normal</footerfontweight>
     <footerlinkcolor>#FFFFFF</footerlinkcolor>
     <footerlinkhovercolor>#CCCCCC</footerlinkhovercolor>
     <footerlinkunderlined>off</footerlinkunderlined>
     <footerlinkunderlinedhover>on</footerlinkunderlinedhover>
     <footerheight>50px</footerheight>
     <footerlogofilefr>image::theme::files/poweredby-dialogs-white-fr.png</footerlogofilefr>
     <footerlogofileen>image::theme::files/poweredby-dialogs-white-en.png</footerlogofileen>
     <footerlinkname1fr>FAQ</footerlinkname1fr>
     <footerlinkurl1fr>#</footerlinkurl1fr>
     <footerlinkname2fr>Politique de confidentialité</footerlinkname2fr>
     <footerlinkurl2fr>#</footerlinkurl2fr>
     <footerlinkname3fr>Nous joindre</footerlinkname3fr>
     <footerlinkurl3fr>#</footerlinkurl3fr>
     <footerlinkname1en>FAQ</footerlinkname1en>
     <footerlinkurl1en>#</footerlinkurl1en>
     <footerlinkname2en>Privacy Policy</footerlinkname2en>
     <footerlinkurl2en>#</footerlinkurl2en>
     <footerlinkname3en>Contact Us</footerlinkname3en>
     <footerlinkurl3en>#</footerlinkurl3en>
     <animatebody>off</animatebody>
     <bodyanimation>fadeInTop</bodyanimation>
     <bodyanimationduration>500</bodyanimationduration>
     <animatequestion>off</animatequestion>
     <questionanimation>fadeInTop</questionanimation>
     <questionanimationduration>500</questionanimationduration>
     <animatealert>off</animatealert>
     <alertanimation>fadeIn</alertanimation>
     <alertanimationduration>500</alertanimationduration>
     <animatecheckbox>on</animatecheckbox>
     <checkboxanimation>zoomIn</checkboxanimation>
     <checkboxanimationduration>500</checkboxanimationduration>
     <animateradio>on</animateradio>
     <radioanimation>zoomIn</radioanimation>
     <radioanimationduration>500</radioanimationduration>
     <font>noto</font>
    </options>
   </config>
  </theme>
 </themes_inherited>
</document>
limesurvey_survey_638133.lss (35,110 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)5.3.30
I will donate to the project if issue is resolvedNo
BrowserOpera
Database type & versionmariadb Ver 15.1 Distrib 10.4.25-MariaDB, for Linux (x86_64) using readline 5.1
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4

Relationships

related to 18394 confirmed Sometimes, when creating/copying questions, code dump can ocurr 
related to 18396 confirmed Quesiton model: Validators created by rules are not refreshed when attributes change 
related to 18397 confirmed When copying a question with sub-questions, errors from subquestion models are not showed 
related to 18404 closedgabrieljenik Error after copying question: Trying to property 'language' of non-object 

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2022-08-23 14:54

manager   ~71517

Thanks. Bug received.
Will try to reproduce it and be back.

jelo

jelo

2022-09-28 21:22

partner   ~72011

I can confirm that behaviour with the demo version Version 5.4.2.

The copyied question is having one subquestion with the default SQ001 instead of the subquestions in the source question.

gabrieljenik

gabrieljenik

2022-09-29 20:43

manager   ~72023

Yes, we are on it.
Hope I can deliver a PR in the next couple of days

gabrieljenik

gabrieljenik

2022-10-04 14:42

manager   ~72074

Setting attributes using setAttributes($safeOnly=false), as to not trigger the process of creating the validators.

PR: https://github.com/LimeSurvey/LimeSurvey/pull/2644

We need to use setAttributes here with $safeOnly=false to avoid issue 18323.
Otherwise validators are loaded before setting the attributes.
Right now, probably a bug, some rules are added as validators conditionally, depending on the attribute values.
Then the rules set (final validators loaded) may not match the attributes which are later set.

gabrieljenik

gabrieljenik

2022-10-04 15:08

manager   ~72078

Related errors caught while reviewing:

https://bugs.limesurvey.org/view.php?id=18394

https://bugs.limesurvey.org/view.php?id=18396

https://bugs.limesurvey.org/view.php?id=18397

DenisChenu

DenisChenu

2022-10-04 15:20

developer   ~72084

We need to use setAttributes here with $safeOnly=false to avoid issue 18323.

Why we don't need it in 3.X ?

QuestionL10n new relation ?

gabrieljenik

gabrieljenik

2022-10-04 15:22

manager   ~72087

Maybe we need it. Not sure. Haven't gone into that.
Started by reporting it.

DenisChenu

DenisChenu

2022-10-04 15:25

developer   ~72090

I mean : copy question work on 3.X but not on 5.x; Then we don't need it in 3.X

Maybe questiontheme here

gabrieljenik

gabrieljenik

2022-10-06 10:23

manager   ~72139

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

LimeBot

LimeBot

2022-10-10 10:47

administrator   ~72177

Fixed in Release 5.4.5+221010

Related Changesets

LimeSurvey: master e69c7f5e

2022-10-06 12:23

gabrieljenik

Committer: GitHub


Details Diff
Fixed issue 18323: When copying a question with sub-questions, the sub-questions are not copied (#2644)

Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
Affected Issues
18323
mod - application/models/services/CopyQuestion.php Diff File

Issue History

Date Modified Username Field Change
2022-08-20 17:47 francois-charles.hebert New Issue
2022-08-20 17:47 francois-charles.hebert File Added: limesurvey_survey_638133.lss
2022-08-22 10:54 ollehar Priority none => high
2022-08-22 18:17 gabrieljenik Severity minor => partial_block
2022-08-22 18:18 gabrieljenik Status new => acknowledged
2022-08-23 14:54 gabrieljenik Note Added: 71517
2022-08-23 14:54 gabrieljenik Bug heat 0 => 2
2022-08-24 20:26 gabrieljenik Status acknowledged => confirmed
2022-09-27 19:34 gabrieljenik Assigned To => gabrieljenik
2022-09-27 19:34 gabrieljenik Status confirmed => assigned
2022-09-28 21:22 jelo Note Added: 72011
2022-09-28 21:22 jelo Bug heat 2 => 4
2022-09-29 20:43 gabrieljenik Note Added: 72023
2022-10-04 14:42 gabrieljenik Assigned To gabrieljenik => DenisChenu
2022-10-04 14:42 gabrieljenik Status assigned => ready for code review
2022-10-04 14:42 gabrieljenik Note Added: 72074
2022-10-04 14:52 gabrieljenik Issue cloned: 18394
2022-10-04 14:52 gabrieljenik Relationship added related to 18394
2022-10-04 15:02 gabrieljenik Issue cloned: 18396
2022-10-04 15:02 gabrieljenik Relationship added related to 18396
2022-10-04 15:06 gabrieljenik Issue cloned: 18397
2022-10-04 15:06 gabrieljenik Relationship added related to 18397
2022-10-04 15:08 gabrieljenik Note Added: 72078
2022-10-04 15:20 DenisChenu Note Added: 72084
2022-10-04 15:20 DenisChenu Bug heat 4 => 6
2022-10-04 15:22 gabrieljenik Note Added: 72087
2022-10-04 15:25 DenisChenu Note Added: 72090
2022-10-04 18:55 DenisChenu Status ready for code review => ready for testing
2022-10-04 19:04 DenisChenu Assigned To DenisChenu =>
2022-10-04 19:04 DenisChenu Status ready for testing => ready for merge
2022-10-06 10:23 gabrieljenik Changeset attached => LimeSurvey master e69c7f5e
2022-10-06 10:23 gabrieljenik Note Added: 72139
2022-10-06 10:23 gabrieljenik Assigned To => gabrieljenik
2022-10-06 10:23 gabrieljenik Resolution open => fixed
2022-10-10 10:47 LimeBot Note Added: 72177
2022-10-10 10:47 LimeBot Status ready for merge => closed
2022-10-10 10:47 LimeBot Bug heat 6 => 8
2022-10-12 01:31 gabrieljenik Relationship added related to 18404