View Issue Details

This issue affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
11766Bug reportsSurvey editingpublic2016-10-14 10:24
Reportertammo Assigned Toollehar  
PrioritynoneSeveritypartial_block 
Status closedResolutionwon't fix 
Product Version2.53 
Fixed in Version2.54 
Summary11766: 2.54 Crash when using editted answers codes
Description

I did the following: in Notepad++ I defined many answers options in the following way:
1;Option 1
23;option 2
56;option 3
9;option 4
3;option 5 (note the irregularity in codes: they are not in order)

Pasting this in the quick add of the List (radio) question type, I got
A1 1;Option 1
A2 23;option 2
A3 56;option 3
A4 9;option 4
A5 3;option 5 desp[ite the idea that before the semicolon the code was defined.

After changing al this to:
1 Option 1
23 option 2
56 option 3
9 option 4
3 option 5 where in the first column the label of the option is defined, the survey crashed at a previes of the question/group:

Notice: Undefined index: 222745X434X2235 in /home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/application/helpers/qanda_helper.php on line 1515

Steps To Reproduce

Use attached question

Additional Information

/home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/application/helpers/SurveyRuntimeHelper.php(1283)

1271 }
1272
1273 $showgroupdesc = $showgroupinfo == 'B' / both / || $showgroupinfo == 'D'; / (group-) description /
1274
1275 if (!$previewquestion && trim($redata['groupdescription'])!="" && $showgroupdesc
)
1276 {
1277 echo templatereplace(file_get_contents($sTemplateViewPath."groupdescription.pstpl"), array(), $redata);
1278 }
1279 echo "\n";
1280
1281 echo "\n\n<!-- PRESENT THE QUESTIONS (in SurveyRunTime ) -->\n";
1282
1283 foreach ($qanda as $qa) // one entry per QID
1284 {
1285 // Test if finalgroup is in this qid (for all in one survey, else we do only qanda for needed question (in one by one or group by goup)
1286 if ($gid != $qa['finalgroup']) {
1287 continue;
1288 }
1289 $qid = $qa[4];
1290 $qinfo = LimeExpressionManager::GetQuestionStatus($qid);
1291 $lastgrouparray = explode("X", $qa[7]);
1292 $lastgroup = $lastgrouparray[0] . "X" . $lastgrouparray[1]; // id of the last group, derived from question id
1293 $lastanswer = $qa[7];
1294
1295

Stack Trace
#0

/home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/application/controllers/survey/index.php(611): SurveyRuntimeHelper->run("222745", array("surveyid" => "222745", "thissurvey" => array("template" => "fnvdev", "language" => "nl-informal", "sid" => "222745", "owner_id" => "1", ...), "thisstep" => null, "tokensexist" => 0, ...))

606 //Send local variables to the appropriate survey type
607 unset($redata);
608 $redata = compact(array_keys(get_defined_vars()));
609 Yii::import('application.helpers.SurveyRuntimeHelper');
610 $tmp = new SurveyRuntimeHelper();
611 $tmp->run($surveyid,$redata);
612
613 if (App()->request->getPost('saveall') || isset($flashmessage))
614 {
615 App()->clientScript->registerScript("saveflashmessage","alert('".gT("Your responses were successfully saved.","js")."');",CClientScript::POS_READY);
616 }

#1

/home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/application/controllers/survey/index.php(70): index->action()

65 App()->getClientScript()->reset();
66 return $buffer;
67 });
68
69 ob_implicit_flush(false);
70 $this->action();
71 ob_flush();
72 }
73
74 function action()
75 {

#2
+
/home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/framework/web/actions/CAction.php(76): index->run()
#3
+
/home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/framework/web/CController.php(308): CAction->runWithParams(array("action" => "previewquestion", "sid" => "222745", "gid" => "434", "qid" => "2235", ...))
#4
+
/home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/framework/web/CController.php(286): CController->runAction(index)
#5
+
/home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/framework/web/CController.php(265): CController->runActionWithFilters(index, array())
#6
+
/home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/framework/web/CWebApplication.php(282): CController->run("index")
#7
+
/home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/framework/web/CWebApplication.php(141): CWebApplication->runController("survey/index/action/previewquestion/sid/222745/gid/434/qid/2235/...")
#8
+
/home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/framework/base/CApplication.php(185): CWebApplication->processRequest()
#9

/home/fnvggwm/domains/vragen.gewoongoedwerkmeter.nl/public_html/index.php(214): CApplication->run()

209 die (sprintf('%s should be writable by the webserver (766 or 776).', $sDefaultRuntimePath));
210 }
211 }
212
213 Yii::$enableIncludePath = false;
214 Yii::createApplication('LSYii_Application', $config)->run();
215
216 / End of file index.php /
217 / Location: ./index.php /

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)2.54 161007
I will donate to the project if issue is resolvedNo
BrowserFF
Database type & versionmysqlnd 5.0.11-dev
Server OS (if known)Linux CGI/FastCGI
Webserver software & version (if known)Apache
PHP Version5.6.26

Users monitoring this issue

There are no users monitoring this issue.

Activities

tammo

tammo

2016-10-10 11:50

developer   ~41208

Solved: this coincided with having an empty group in the survey.

LS could help better if the error message was a bit clearer though...

tammo

tammo

2016-10-10 11:54

developer   ~41209

And also: adding via code;Answer option does not seem to work.

jelo

jelo

2016-10-10 13:23

partner   ~41210

mysqlnd 5.0.11-dev isn't the database version. Don't think that is important in solving this issue, but that won't be always the case.

You stated the mysqlnd version, which is bundled with PHP.
http://php.net/manual/en/mysqlnd.plugin.obtaining.php

Look up via console or via phpmyadmin.
Since you are using DirectAdmin just a link:
http://forum.directadmin.com/showthread.php?t=33062

tammo

tammo

2016-10-10 13:32

developer   ~41211

OK, thank you!

Apache 2.4.23
MySQL 5.5.52

ollehar

ollehar

2016-10-13 11:38

administrator   ~41285

PHP notice is only showed if debug = 2.

c_schmitz

c_schmitz

2016-10-14 10:24

administrator   ~41333

Version 2.54.3 Build 161014 released

Issue History

Date Modified Username Field Change
2016-10-10 11:13 tammo New Issue
2016-10-10 11:13 tammo File Added: limesurvey_question_2235.lsq
2016-10-10 11:50 tammo Note Added: 41208
2016-10-10 11:54 tammo Note Added: 41209
2016-10-10 13:23 jelo Note Added: 41210
2016-10-10 13:32 tammo Note Added: 41211
2016-10-13 11:37 ollehar Assigned To => ollehar
2016-10-13 11:37 ollehar Status new => assigned
2016-10-13 11:38 ollehar Note Added: 41285
2016-10-13 11:41 ollehar Status assigned => resolved
2016-10-13 11:41 ollehar Resolution open => won't fix
2016-10-13 11:41 ollehar Fixed in Version => 2.54
2016-10-14 10:24 c_schmitz Note Added: 41333
2016-10-14 10:24 c_schmitz Status resolved => closed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing