Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
18501Bug reportsSurvey takingpublic2022-11-23 08:23
ReporterMazi Assigned To 
PriorityhighSeverityblock 
Status ready for code reviewResolutionopen 
Product Version5.4.x 
Summary18501: Answers with answer code 0 (zero) do NOT get saved if question is set to use encrypted data
Description

We are using an array question with an answer scale of 0 to 6 and same answer codes. If someone picks option with answer code 0, the data does NOT get saved. Thus, we can not differentiate between "not answered" and answered with answer code 0.

Steps To Reproduce

Steps to reproduce

Import the attached survey and enter some responses for answer code 0.

Expected result

Save answer code 0

Actual result

No data seems to be saved for code 0.

Additional Information

Only seems to show if question is set to use encrypted data.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)Version 5.4.12+221121
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMariaDB 10.1.48
Server OS (if known)
Webserver software & version (if known)
PHP Version8.1

Relationships

related to 18502 new STATA export of simple array question fails (due to encryption?) 

Activities

ollehar

ollehar

2022-11-21 16:45

administrator   ~72837

Classic. Something for @DenisChenu? Make sure to write a unit test after fix, please.

Mazi

Mazi

2022-11-21 16:56

updater   ~72838

Updated details since it seems to be caused by encrypted setting.

Mazi

Mazi

2022-11-21 16:57

updater   ~72839

Added updated demo survey with encryption.

limesurvey_survey_888479.lss (26,063 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<document>
 <LimeSurveyDocType>Survey</LimeSurveyDocType>
 <DBVersion>491</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[8642]]></aid>
    <qid><![CDATA[8834]]></qid>
    <code><![CDATA[0]]></code>
    <sortorder><![CDATA[0]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
   <row>
    <aid><![CDATA[8643]]></aid>
    <qid><![CDATA[8834]]></qid>
    <code><![CDATA[1]]></code>
    <sortorder><![CDATA[1]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
   <row>
    <aid><![CDATA[8644]]></aid>
    <qid><![CDATA[8834]]></qid>
    <code><![CDATA[2]]></code>
    <sortorder><![CDATA[2]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
   <row>
    <aid><![CDATA[8645]]></aid>
    <qid><![CDATA[8834]]></qid>
    <code><![CDATA[3]]></code>
    <sortorder><![CDATA[3]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
   <row>
    <aid><![CDATA[8646]]></aid>
    <qid><![CDATA[8834]]></qid>
    <code><![CDATA[4]]></code>
    <sortorder><![CDATA[4]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
   <row>
    <aid><![CDATA[8647]]></aid>
    <qid><![CDATA[8834]]></qid>
    <code><![CDATA[5]]></code>
    <sortorder><![CDATA[5]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
   <row>
    <aid><![CDATA[8648]]></aid>
    <qid><![CDATA[8834]]></qid>
    <code><![CDATA[6]]></code>
    <sortorder><![CDATA[6]]></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[14652]]></id>
    <aid><![CDATA[8642]]></aid>
    <answer><![CDATA[0]]></answer>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[14653]]></id>
    <aid><![CDATA[8643]]></aid>
    <answer><![CDATA[1]]></answer>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[14654]]></id>
    <aid><![CDATA[8644]]></aid>
    <answer><![CDATA[2]]></answer>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[14655]]></id>
    <aid><![CDATA[8645]]></aid>
    <answer><![CDATA[3]]></answer>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[14656]]></id>
    <aid><![CDATA[8646]]></aid>
    <answer><![CDATA[4]]></answer>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[14657]]></id>
    <aid><![CDATA[8647]]></aid>
    <answer><![CDATA[5]]></answer>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[14658]]></id>
    <aid><![CDATA[8648]]></aid>
    <answer><![CDATA[7]]></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[622]]></gid>
    <sid><![CDATA[888479]]></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[781]]></id>
    <gid><![CDATA[622]]></gid>
    <group_name><![CDATA[My first question group]]></group_name>
    <language><![CDATA[en]]></language>
    <sid><![CDATA[888479]]></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>
   <fieldname>same_script</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[8834]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[888479]]></sid>
    <gid><![CDATA[622]]></gid>
    <type><![CDATA[F]]></type>
    <title><![CDATA[Q00]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[Y]]></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[arrays/array]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
   </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>
   <fieldname>same_script</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[8847]]></qid>
    <parent_qid><![CDATA[8834]]></parent_qid>
    <sid><![CDATA[888479]]></sid>
    <gid><![CDATA[622]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ001]]></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>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
   </row>
   <row>
    <qid><![CDATA[8848]]></qid>
    <parent_qid><![CDATA[8834]]></parent_qid>
    <sid><![CDATA[888479]]></sid>
    <gid><![CDATA[622]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ002]]></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>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
   </row>
   <row>
    <qid><![CDATA[8849]]></qid>
    <parent_qid><![CDATA[8834]]></parent_qid>
    <sid><![CDATA[888479]]></sid>
    <gid><![CDATA[622]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ003]]></title>
    <other><![CDATA[N]]></other>
    <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[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
   </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[15698]]></id>
    <qid><![CDATA[8834]]></qid>
    <question><![CDATA[Please rate (0=bad, 6=great)]]></question>
    <help><![CDATA[This is a question help text.]]></help>
    <script/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[15711]]></id>
    <qid><![CDATA[8847]]></qid>
    <question><![CDATA[high price | low price]]></question>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[15712]]></id>
    <qid><![CDATA[8848]]></qid>
    <question><![CDATA[low quality | high quality]]></question>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[15713]]></id>
    <qid><![CDATA[8849]]></qid>
    <question><![CDATA[bad design | good design]]></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[8834]]></qid>
    <attribute><![CDATA[answer_width]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[array_filter]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[array_filter_exclude]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[array_filter_style]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[ArrayWithOtherFreeText]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[clear_default]]></attribute>
    <value><![CDATA[N]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[cssclass]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[em_validation_q]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[em_validation_q_tip]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[exclude_all_others]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[hidden]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[hide_tip]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[max_answers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[min_answers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[page_break]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[printable_help]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[public_statistics]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[random_group]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[random_order]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[repeat_headings]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[save_as_default]]></attribute>
    <value><![CDATA[N]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[scale_export]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[statistics_graphtype]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></qid>
    <attribute><![CDATA[statistics_showgraph]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[8834]]></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[888479]]></sid>
    <gsid><![CDATA[1]]></gsid>
    <admin><![CDATA[inherit]]></admin>
    <adminemail><![CDATA[inherit]]></adminemail>
    <anonymized><![CDATA[N]]></anonymized>
    <format><![CDATA[I]]></format>
    <savetimings><![CDATA[N]]></savetimings>
    <template><![CDATA[inherit]]></template>
    <language><![CDATA[en]]></language>
    <additional_languages/>
    <datestamp><![CDATA[Y]]></datestamp>
    <usecookie><![CDATA[I]]></usecookie>
    <allowregister><![CDATA[I]]></allowregister>
    <allowsave><![CDATA[I]]></allowsave>
    <autonumber_start><![CDATA[3]]></autonumber_start>
    <autoredirect><![CDATA[I]]></autoredirect>
    <allowprev><![CDATA[I]]></allowprev>
    <printanswers><![CDATA[I]]></printanswers>
    <ipaddr><![CDATA[N]]></ipaddr>
    <ipanonymize><![CDATA[N]]></ipanonymize>
    <refurl><![CDATA[N]]></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>
    <googleanalyticsstyle/>
    <googleanalyticsapikey/>
    <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[888479]]></surveyls_survey_id>
    <surveyls_language><![CDATA[en]]></surveyls_language>
    <surveyls_title><![CDATA[Array Rating Test]]></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>888479</sid>
   <template_name>fruity</template_name>
   <config>
    <options>inherit</options>
   </config>
  </theme>
 </themes>
 <themes_inherited>
  <theme>
   <sid>888479</sid>
   <template_name>fruity</template_name>
   <config>
    <options>
     <ajaxmode>off</ajaxmode>
     <brandlogo>on</brandlogo>
     <brandlogofile>themes/survey/fruity/files/logo.png</brandlogofile>
     <container>on</container>
     <backgroundimage>off</backgroundimage>
     <animatebody>off</animatebody>
     <bodyanimation>fadeInRight</bodyanimation>
     <bodyanimationduration>500</bodyanimationduration>
     <animatequestion>off</animatequestion>
     <questionanimation>flipInX</questionanimation>
     <questionanimationduration>500</questionanimationduration>
     <animatealert>off</animatealert>
     <alertanimation>shake</alertanimation>
     <alertanimationduration>500</alertanimationduration>
     <font>noto</font>
     <bodybackgroundcolor>#ffffff</bodybackgroundcolor>
     <fontcolor>#444444</fontcolor>
     <questionbackgroundcolor>#ffffff</questionbackgroundcolor>
     <questionborder>on</questionborder>
     <questioncontainershadow>on</questioncontainershadow>
     <checkicon>f00c</checkicon>
     <animatecheckbox>on</animatecheckbox>
     <checkboxanimation>rubberBand</checkboxanimation>
     <checkboxanimationduration>500</checkboxanimationduration>
     <animateradio>on</animateradio>
     <radioanimation>zoomIn</radioanimation>
     <radioanimationduration>500</radioanimationduration>
     <zebrastriping>off</zebrastriping>
     <stickymatrixheaders>off</stickymatrixheaders>
     <greyoutselected>off</greyoutselected>
     <hideprivacyinfo>off</hideprivacyinfo>
     <crosshover>off</crosshover>
     <showpopups>1</showpopups>
     <showclearall>off</showclearall>
     <questionhelptextposition>top</questionhelptextposition>
     <notables>1</notables>
    </options>
   </config>
  </theme>
 </themes_inherited>
</document>
limesurvey_survey_888479.lss (26,063 bytes)   
ollehar

ollehar

2022-11-21 17:00

administrator   ~72840

Oh, ok then maybe not for Denis. Hm.

DenisChenu

DenisChenu

2022-11-21 17:11

developer   ~72842

:D
We already have the issue with some 0 in 3.X without encryption … but no unit test

@Mazi : you confirm it work witout encryption ?

@ollehar : yes happy to work on encryption but in some week please : https://www.sondages.pro/availability/availability.html
I take a quick look

Mazi

Mazi

2022-11-21 17:14

updater   ~72843

@DeniChenu, without encryption 0 value is stored fine.

DenisChenu

DenisChenu

2022-11-21 18:20

developer   ~72844

Confirmed

DenisChenu

DenisChenu

2022-11-21 19:02

developer   ~72846

https://github.com/LimeSurvey/LimeSurvey/pull/2738

@ollehar : i try to create the unit test this week.

DenisChenu

DenisChenu

2022-11-22 08:43

developer   ~72847

@ollehar : see the error …

I try manually to better understand what happen …

        $failedEmailModel = new FailedEmail();
        $failedEmailModel->recipient = 'test@example.com';
        $failedEmailModel->responseid = 1;
        $failedEmailModel->surveyid = $surveyId;
        $failedEmailModel->email_type = 'admin_notification';
        $failedEmailModel->language = 'en';
        $failedEmailModel->error_message = 'test error message display';
        $failedEmailModel->created = date('Y-m-d H:i:s');
        $failedEmailModel->status = FailedEmail::STATE_FAILED;
        $failedEmailModel->updated = date('Y-m-d H:i:s');
        $failedEmailModel->resend_vars = &quot;{\&quot;message_type\&quot;:\&quot;alt\&quot;,\&quot;Subject\&quot;:\&quot;Response submission for survey Surveytest 1 Question\&quot;,\&quot;uniqueid\&quot;:\&quot;2xVoMczyB0mqe8SPHO9qAsO0AKGd5jvqY76gJT8bNg\&quot;,\&quot;boundary\&quot;:{\&quot;1\&quot;:\&quot;b1_2xVoMczyB0mqe8SPHO9qAsO0AKGd5jvqY76gJT8bNg\&quot;,\&quot;2\&quot;:\&quot;b2_2xVoMczyB0mqe8SPHO9qAsO0AKGd5jvqY76gJT8bNg\&quot;,\&quot;3\&quot;:\&quot;b3_2xVoMczyB0mqe8SPHO9qAsO0AKGd5jvqY76gJT8bNg\&quot;},\&quot;MIMEBody\&quot;:\&quot;This is a multi-part message in MIME format.\\r\\n\\r\\n--b1_2xVoMczyB0mqe8SPHO9qAsO0AKGd5jvqY76gJT8bNg\\r\\nContent-Type: text\\\/plain; charset=us-ascii\\r\\n\\r\\nHello,A new response was submitted for your survey 'Surveytest 1 Question'.Click the following link to see the individual response:http:\\\/\\\/127.0.0.1:8083\\\/index.php?r=responses\\\/view&surveyId=565531&id=34Click the following link to edit the individual response:http:\\\/\\\/127.0.0.1:8083\\\/index.php?r=admin\\\/dataentry\\\/sa\\\/editdata\\\/subaction\\\/edit\\\/surveyid\\\/565531\\\/id\\\/34View statistics by clicking here:http:\\\/\\\/127.0.0.1:8083\\\/index.php?r=admin\\\/statistics\\\/sa\\\/index\\\/surveyid\\\/565531\\r\\n\\r\\n--b1_2xVoMczyB0mqe8SPHO9qAsO0AKGd5jvqY76gJT8bNg\\r\\nContent-Type: text\\\/html; charset=us-ascii\\r\\n\\r\\n&lt;html>Hello,&lt;br \\\/>&lt;br \\\/>A new response was submitted for your survey 'Surveytest 1 Question'.&lt;br \\\/>&lt;br \\\/>Click the following link to see the individual response:&lt;br \\\/>http:\\\/\\\/127.0.0.1:8083\\\/index.php?r=responses\\\/view&surveyId=565531&id=34&lt;br \\\/>&lt;br \\\/>Click the following link to edit the individual response:&lt;br \\\/>http:\\\/\\\/127.0.0.1:8083\\\/index.php?r=admin\\\/dataentry\\\/sa\\\/editdata\\\/subaction\\\/edit\\\/surveyid\\\/565531\\\/id\\\/34&lt;br \\\/>&lt;br \\\/>View statistics by clicking here:&lt;br \\\/>http:\\\/\\\/127.0.0.1:8083\\\/index.php?r=admin\\\/statistics\\\/sa\\\/index\\\/surveyid\\\/565531&lt;\\\/html>\\r\\n\\r\\n\\r\\n--b1_2xVoMczyB0mqe8SPHO9qAsO0AKGd5jvqY76gJT8bNg--\\r\\n\&quot;}&quot;;
        $failedEmailModel->save(false);

=> No issue

And currently : all my email system are OK, but email was not sent …

I quit … no time to fix this part (and don't understand why it's happen here).

DenisChenu

DenisChenu

2022-11-22 11:34

developer   ~72848

OK,
Don't try to decrypt empty value : FailedEmail test is OK

Still don't understand why this test try to decrypt value (and what value is broken)

Issue History

Date Modified Username Field Change
2022-11-21 16:43 Mazi New Issue
2022-11-21 16:43 Mazi File Added: survey_archive_888479.lsa
2022-11-21 16:45 ollehar Note Added: 72837
2022-11-21 16:45 ollehar Bug heat 0 => 2
2022-11-21 16:45 Mazi File Deleted: survey_archive_888479.lsa
2022-11-21 16:56 Mazi Summary Answers with answer code 0 (zero) do NOT get saved => Answers with answer code 0 (zero) do NOT get saved if question is set to use encrypted data
2022-11-21 16:56 Mazi Additional Information Updated
2022-11-21 16:56 Mazi Note Added: 72838
2022-11-21 16:56 Mazi Bug heat 2 => 4
2022-11-21 16:57 Mazi Note Added: 72839
2022-11-21 16:57 Mazi File Added: limesurvey_survey_888479.lss
2022-11-21 17:00 ollehar Note Added: 72840
2022-11-21 17:00 ollehar Priority none => high
2022-11-21 17:08 Mazi Relationship added parent of 18502
2022-11-21 17:11 DenisChenu Note Added: 72842
2022-11-21 17:11 DenisChenu Bug heat 4 => 6
2022-11-21 17:14 Mazi Note Added: 72843
2022-11-21 18:20 DenisChenu Assigned To => DenisChenu
2022-11-21 18:20 DenisChenu Status new => assigned
2022-11-21 18:20 DenisChenu Note Added: 72844
2022-11-21 19:02 DenisChenu Note Added: 72846
2022-11-22 08:43 DenisChenu Note Added: 72847
2022-11-22 08:43 DenisChenu Assigned To DenisChenu =>
2022-11-22 08:44 DenisChenu Status assigned => confirmed
2022-11-22 11:34 DenisChenu Status confirmed => ready for code review
2022-11-22 11:34 DenisChenu Note Added: 72848
2022-11-23 08:23 DenisChenu Relationship deleted parent of 18502
2022-11-23 08:23 DenisChenu Relationship added related to 18502