View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
18823Bug reportsImport/Exportpublic2024-11-19 18:15
Reporterquasar_ Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version5.6.x 
Summary18823: STATA Export fails with certain question types
Description

Exporting to STATA (.xml) results in error with certain question types e.g. List (radio).
Probably something to do with the codes in Answer options, letters seem to cause the problem.
If I only have numbers as codes, then everything works.

Steps To Reproduce

Steps to reproduce

  1. Create a survey.
  2. Create a question group with one question of type "List (radio)".
  3. Add a second answer option and do not change default Codes.
  4. Activate the survey.
  5. Run the survey.
  6. Choose first or second answer options and submit the survey.
  7. Go to "Settings" > "Responses" > "Export" > "Export responses".
  8. Choose "STATA (.xml) and click "Export".

Expected result

.xml file gets downloaded.

Actual result

This site can’t be reached
The webpage at https:// might be temporarily down or it may have moved permanently to a new web address.
ERR_INVALID_RESPONSE

TagsNo tags attached.
Attached Files
limesurvey_survey_558561.lss (21,860 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<document>
 <LimeSurveyDocType>Survey</LimeSurveyDocType>
 <DBVersion>495</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[382]]></aid>
    <qid><![CDATA[559]]></qid>
    <code><![CDATA[AO01]]></code>
    <sortorder><![CDATA[0]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
   <row>
    <aid><![CDATA[383]]></aid>
    <qid><![CDATA[559]]></qid>
    <code><![CDATA[AO02]]></code>
    <sortorder><![CDATA[1]]></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[552]]></id>
    <aid><![CDATA[382]]></aid>
    <answer><![CDATA[Option 1]]></answer>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[553]]></id>
    <aid><![CDATA[383]]></aid>
    <answer><![CDATA[Option 2]]></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[117]]></gid>
    <sid><![CDATA[558561]]></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[132]]></id>
    <gid><![CDATA[117]]></gid>
    <group_name><![CDATA[My first question group]]></group_name>
    <language><![CDATA[en]]></language>
    <sid><![CDATA[558561]]></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>question_order</fieldname>
   <fieldname>scale_id</fieldname>
   <fieldname>same_default</fieldname>
   <fieldname>relevance</fieldname>
   <fieldname>modulename</fieldname>
   <fieldname>encrypted</fieldname>
   <fieldname>question_theme_name</fieldname>
   <fieldname>same_script</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[559]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[558561]]></sid>
    <gid><![CDATA[117]]></gid>
    <type><![CDATA[L]]></type>
    <title><![CDATA[Q00]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <question_order><![CDATA[1]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <encrypted><![CDATA[N]]></encrypted>
    <question_theme_name><![CDATA[listradio]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
   </row>
  </rows>
 </questions>
 <question_l10ns>
  <fields>
   <fieldname>id</fieldname>
   <fieldname>qid</fieldname>
   <fieldname>question</fieldname>
   <fieldname>help</fieldname>
   <fieldname>language</fieldname>
   <fieldname>script</fieldname>
  </fields>
  <rows>
   <row>
    <id><![CDATA[782]]></id>
    <qid><![CDATA[559]]></qid>
    <question><![CDATA[A first example question. Please answer this question:]]></question>
    <help><![CDATA[This is a question help text.]]></help>
    <language><![CDATA[en]]></language>
    <script/>
   </row>
  </rows>
 </question_l10ns>
 <question_attributes>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>attribute</fieldname>
   <fieldname>value</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[answer_order]]></attribute>
    <value><![CDATA[normal]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[array_filter]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[array_filter_exclude]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[array_filter_style]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[cssclass]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[display_columns]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[em_validation_q]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[em_validation_q_tip]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[hidden]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[hide_tip]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[other_comment_mandatory]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[other_numbers_only]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[other_position]]></attribute>
    <value><![CDATA[default]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[other_position_code]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[other_replace_text]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[page_break]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[printable_help]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[public_statistics]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[random_group]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[save_as_default]]></attribute>
    <value><![CDATA[N]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[scale_export]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[statistics_graphtype]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[statistics_showgraph]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_action]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_countdown_message]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_disable_next]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_disable_prev]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_message]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_message_delay]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_message_style]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_timer_style]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_warning]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_warning_2]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_warning_2_display_time]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_warning_2_message]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_warning_2_style]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_warning_display_time]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_warning_message]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[559]]></qid>
    <attribute><![CDATA[time_limit_warning_style]]></attribute>
    <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>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>
   <fieldname>ipanonymize</fieldname>
  </fields>
  <rows>
   <row>
    <sid><![CDATA[558561]]></sid>
    <gsid><![CDATA[1]]></gsid>
    <admin/>
    <adminemail/>
    <anonymized><![CDATA[N]]></anonymized>
    <format><![CDATA[I]]></format>
    <savetimings><![CDATA[I]]></savetimings>
    <template><![CDATA[vanilla]]></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>
    <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/>
    <ipanonymize><![CDATA[I]]></ipanonymize>
   </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>
   <fieldname>surveyls_alias</fieldname>
  </fields>
  <rows>
   <row>
    <surveyls_survey_id><![CDATA[558561]]></surveyls_survey_id>
    <surveyls_language><![CDATA[en]]></surveyls_language>
    <surveyls_title><![CDATA[stata_export]]></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},

You have been invited to participate in a survey.

The survey is titled:
"{SURVEYNAME}"

"{SURVEYDESCRIPTION}"

To participate, please click on the link below.

Sincerely,

{ADMINNAME} ({ADMINEMAIL})

----------------------------------------------
Click here to do the survey:
{SURVEYURL}

If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:
{OPTOUTURL}

If you are blacklisted but want to participate in this survey and want to receive invitations please click the following link:
{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},

Recently we invited you to participate in a survey.

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.

The survey is titled:
"{SURVEYNAME}"

"{SURVEYDESCRIPTION}"

To participate, please click on the link below.

Sincerely,

{ADMINNAME} ({ADMINEMAIL})

----------------------------------------------
Click here to do the survey:
{SURVEYURL}

If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:
{OPTOUTURL}]]></surveyls_email_remind>
    <surveyls_email_register_subj><![CDATA[Survey registration confirmation]]></surveyls_email_register_subj>
    <surveyls_email_register><![CDATA[Dear {FIRSTNAME},

You, or someone using your email address, have registered to participate in an online survey titled {SURVEYNAME}.

To complete this survey, click on the following URL:

{SURVEYURL}

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},

This email is to confirm that you have completed the survey titled {SURVEYNAME} and your response has been saved. Thank you for participating.

If you have any further questions about this email, please contact {ADMINNAME} on {ADMINEMAIL}.

Sincerely,

{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,

A new response was submitted for your survey '{SURVEYNAME}'.

Click the following link to see the individual response:
{VIEWRESPONSEURL}

Click the following link to edit the individual response:
{EDITRESPONSEURL}

View statistics by clicking here:
{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,

A new response was submitted for your survey '{SURVEYNAME}'.

Click the following link to see the individual response:
{VIEWRESPONSEURL}

Click the following link to edit the individual response:
{EDITRESPONSEURL}

View statistics by clicking here:
{STATISTICSURL}


The following answers were given by the participant:
{ANSWERTABLE}]]></email_admin_responses>
    <surveyls_numberformat><![CDATA[0]]></surveyls_numberformat>
   </row>
  </rows>
 </surveys_languagesettings>
 <themes>
  <theme>
   <sid>558561</sid>
   <template_name>U</template_name>
   <config>
    <options>inherit</options>
   </config>
  </theme>
  <theme>
   <sid>558561</sid>
   <template_name>vanilla</template_name>
   <config>
    <options>inherit</options>
   </config>
  </theme>
 </themes>
 <themes_inherited>
  <theme>
   <sid>558561</sid>
   <template_name>U</template_name>
   <config>
    <options>
     <ajaxmode>off</ajaxmode>
     <brandlogo>on</brandlogo>
     <container>on</container>
     <hideprivacyinfo>off</hideprivacyinfo>
     <brandlogofile>image::theme::files/logo.png</brandlogofile>
     <font>noto</font>
    </options>
   </config>
  </theme>
  <theme>
   <sid>558561</sid>
   <template_name>vanilla</template_name>
   <config>
    <options>
     <ajaxmode>off</ajaxmode>
     <brandlogo>on</brandlogo>
     <container>on</container>
     <hideprivacyinfo>off</hideprivacyinfo>
     <brandlogofile>image::theme::files/logo.png</brandlogofile>
     <font>noto</font>
    </options>
   </config>
  </theme>
 </themes_inherited>
</document>
limesurvey_survey_558561.lss (21,860 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)LimeSurvey Community Edition Version 5.6.10
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL
Server OS (if known)
Webserver software & version (if known)
PHP Version8.0.28

Users monitoring this issue

There are no users monitoring this issue.

Activities

quasar_

quasar_

2023-05-17 23:32

reporter   ~75053

I checked the logs and found the following:
[error] [exception.TypeError] TypeError: Cannot access offset of type string on string in /application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:404
Stack trace:
#0 /application/core/plugins/ExportSTATAxml/STATAxmlWriter.php(529): STATAxmlWriter->updateCustomresponsemap()
#1 /application/helpers/admin/exportresults_helper.php(121): STATAxmlWriter->close()
#2 /application/controllers/admin/Export.php(352): ExportSurveyResultsService->exportResponses()
#3 [internal function]: Export->exportresults()
#4 /vendor/yiisoft/yii/framework/web/actions/CAction.php(115): ReflectionMethod->invokeArgs()
#5 /application/core/SurveyCommonAction.php(83): CAction->runWithParamsInternal()
#6 /vendor/yiisoft/yii/framework/web/CController.php(308): SurveyCommonAction->runWithParams()
#7 /vendor/yiisoft/yii/framework/web/CController.php(286): CController->runAction()
#8 /vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters()
#9 /application/controllers/AdminController.php(202): CController->run()
#10 /vendor/yiisoft/yii/framework/web/CWebApplication.php(282): AdminController->run()
#11 /vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController()
#12 /vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()
#13 /index.php(161): CApplication->run()
#14 {main}

The error occurs in line 404:
https://github.com/LimeSurvey/LimeSurvey/blob/5.6.10+230313/application/core/plugins/ExportSTATAxml/STATAxmlWriter.php#L404

I changed that line to this:
if (is_array($answer) && isset($answer['answer']) && $answer['answer'] == $response) {

now it works.

quasar_

quasar_

2023-05-17 23:50

reporter   ~75060

Created a pull request: https://github.com/LimeSurvey/LimeSurvey/pull/3148

gabrieljenik

gabrieljenik

2023-05-19 23:53

manager   ~75122

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

DenisChenu

DenisChenu

2023-05-22 15:19

developer   ~75140

@quasar_ can you just remove the extra unneeded test ? A isset is OK here.

Thanks a lot

DenisChenu

DenisChenu

2023-05-23 08:23

developer   ~75147

You can test ?

gabrieljenik

gabrieljenik

2023-05-23 15:47

manager   ~75162

Do you have a clear view why this fix is solving the issue?
Does it fix the source of the issue or is it a workaround?

DenisChenu

DenisChenu

2023-05-23 15:48

developer   ~75163

I think it fix

[error] [exception.TypeError] TypeError: Cannot access offset of type string on string in /application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:404

Need debug set ?

DenisChenu

DenisChenu

2023-05-23 15:50

developer   ~75164

Need debug=2 to have this exact issue with this lss file

gabrieljenik

gabrieljenik

2023-05-23 15:53

manager   ~75167

I think it fix
[error] [exception.TypeError] TypeError: Cannot access offset of type string on string in /application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:404

I think it workarounds it.
Why is it trying to look for somethign that doesn't exist?
I think the bug is still there... the fix just avoids it

DenisChenu

DenisChenu

2023-05-31 16:22

developer   ~75299

I'm for merging like that , if you OK i merge.

@quasar_ can report new issue and fix it if he have one :)
(and maybe we can merge more quicker)

gabrieljenik

gabrieljenik

2023-05-31 16:27

manager   ~75302

Seems minor impact, so yes, agree on merge

guest

guest

2023-05-31 16:58

viewer   ~75304

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

gabrieljenik

gabrieljenik

2023-06-13 22:32

manager   ~75619

Last edited: 2023-06-14 18:30

Very basic sanity test added:
https://github.com/LimeSurvey/LimeSurvey/pull/3220
https://github.com/LimeSurvey/LimeSurvey/pull/3225

Related Changesets

LimeSurvey: master 51fcdf9d

2023-05-31 18:58

Oz-men

Committer: GitHub


Details Diff
Fixed issue 18823: STATA Export fails with certain question types (#3148) Affected Issues
18823
mod - application/core/plugins/ExportSTATAxml/STATAxmlWriter.php Diff File

LimeSurvey: master da05975d

2023-06-14 19:08

Gabriel Jenik

Committer: GitHub


Details Diff
Dev: Add test for issue 18823: STATA Export fails with certain question types (#3220)

Co-authored-by: Lapiu Dev <devgit@lapiu.biz>
Affected Issues
18823
add - tests/unit/helpers/remotecontrol/ExportResponsesStataXmlTest.php Diff File

Issue History

Date Modified Username Field Change
2023-05-17 13:04 quasar_ New Issue
2023-05-17 13:04 quasar_ File Added: limesurvey_survey_558561.lss
2023-05-17 23:32 quasar_ Note Added: 75053
2023-05-17 23:32 quasar_ Bug heat 0 => 2
2023-05-17 23:50 quasar_ Note Added: 75060
2023-05-19 23:53 gabrieljenik Assigned To => gabrieljenik
2023-05-19 23:53 gabrieljenik Status new => assigned
2023-05-19 23:53 gabrieljenik Note Added: 75122
2023-05-19 23:53 gabrieljenik Bug heat 2 => 4
2023-05-19 23:56 gabrieljenik Assigned To gabrieljenik => DenisChenu
2023-05-19 23:56 gabrieljenik Status assigned => ready for code review
2023-05-22 15:19 DenisChenu Note Added: 75140
2023-05-22 15:19 DenisChenu Bug heat 4 => 6
2023-05-22 15:19 DenisChenu Status ready for code review => in code review
2023-05-23 08:23 DenisChenu Assigned To DenisChenu => gabrieljenik
2023-05-23 08:23 DenisChenu Status in code review => ready for testing
2023-05-23 08:23 DenisChenu Note Added: 75147
2023-05-23 15:47 gabrieljenik Note Added: 75162
2023-05-23 15:48 DenisChenu Note Added: 75163
2023-05-23 15:50 DenisChenu Note Added: 75164
2023-05-23 15:53 gabrieljenik Note Added: 75167
2023-05-31 16:22 DenisChenu Note Added: 75299
2023-05-31 16:22 DenisChenu Assigned To gabrieljenik => DenisChenu
2023-05-31 16:22 DenisChenu Status ready for testing => ready for merge
2023-05-31 16:27 gabrieljenik Note Added: 75302
2023-05-31 16:58 Changeset attached => LimeSurvey master 51fcdf9d
2023-05-31 16:58 guest Note Added: 75304
2023-05-31 16:58 guest Bug heat 6 => 8
2023-06-01 15:13 DenisChenu Status ready for merge => resolved
2023-06-01 15:13 DenisChenu Resolution open => fixed
2023-06-13 22:32 gabrieljenik Note Added: 75619
2023-06-13 22:33 gabrieljenik Note Edited: 75619
2023-06-14 17:10 Changeset attached => LimeSurvey master da05975d
2023-06-14 18:30 gabrieljenik Note Edited: 75619
2024-11-19 18:15 c_schmitz Status resolved => closed