View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
16145 | Bug reports | Survey editing | public | 2020-04-16 22:38 | 2020-07-29 22:44 |
Reporter | PedaBa | Assigned To | |||
Priority | normal | Severity | crash | ||
Status | closed | Resolution | no change required | ||
Product Version | 4.1.13 | ||||
Summary | 16145: Can't save modified questions | ||||
Description | In my current setup (testing instance, two testing surveys with dummy questions with List (radio) Type L) I can not (directly) save modified questions. As soon as I try to modify the question text and press save, I get a blue box stating "Question cannot be stored. Please check the answer options for duplicates or empty codes." There are some site-notes:
| ||||
Steps To Reproduce | Use a fresh install. Create a single survey. Add 2 groups, 2 questions (List (radio) Type L) per group. Simple question text + 4 answers each. Add some this to one of the questions "int main(int argc, char **argv) { printf("Hello World\n"); }". Save, preview question (you'll get an error about non-found variable). Edit question and try to save. | ||||
Additional Information | Assessment was activated, everything else pretty default. Vanilla layout. | ||||
Tags | No tags attached. | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | Version 4.1.13+200325 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Chromium | ||||
Database type & version | mysql 5.6-r12 | ||||
Server OS (if known) | Gentoo | ||||
Webserver software & version (if known) | apache 2.4.41 | ||||
PHP Version | 7.0.32 | ||||
we are having an issue that i feel may be similar, so I thought i would add some information assuming it is. {"success":false,"message":"Question has been stored, but an error happened: \nAnswer option couldn't be saved. Error: Array\n(\n [code] => Array\n (\n [0] => Answer codes must be unique by question\n )\n\n)\n","error":{"code":500,"type":"LSJsonException","errorCode":0,"message":"Question has been stored, but an error happened: \nAnswer option couldn't be saved. Error: Array\n(\n [code] => Array\n (\n [0] => Answer codes must be unique by question\n )\n\n)\n","file":"\/var\/www\/html\/application\/controllers\/admin\/questionedit.php","line":297,"trace":"#0 [internal function]: questionedit->saveQuestionData()\n#1 \/var\/www\/html\/framework\/web\/actions\/CAction.php(109): ReflectionMethod->invokeArgs()\n#2 \/var\/www\/html\/application\/core\/Survey_Common_Action.php(86): CAction->runWithParamsInternal()\n#3 \/var\/www\/html\/framework\/web\/CController.php(308): Survey_Common_Action->runWithParams()\n#4 \/var\/www\/html\/framework\/web\/CController.php(286): CController->runAction()\n#5 \/var\/www\/html\/framework\/web\/CController.php(265): CController->runActionWithFilters()\n#6 \/var\/www\/html\/application\/controllers\/AdminController.php(180): CController->run()\n#7 \/var\/www\/html\/framework\/web\/CWebApplication.php(282): AdminController->run()\n#8 \/var\/www\/html\/framework\/web\/CWebApplication.php(141): CWebApplication->runController()\n#9 \/var\/www\/html\/framework\/base\/CApplication.php(185): CWebApplication->processRequest()\n#10 \/var\/www\/html\/index.php(182): CApplication->run()\n#11 {main}","traces":[{"function":"saveQuestionData","class":"questionedit","type":"->","file":"unknown","line":0},{"file":"\/var\/www\/html\/framework\/web\/actions\/CAction.php","line":109,"function":"invokeArgs","class":"ReflectionMethod","type":"->"},{"file":"\/var\/www\/html\/application\/core\/Survey_Common_Action.php","line":86,"function":"runWithParamsInternal","class":"CAction","type":"->"},{"file":"\/var\/www\/html\/framework\/web\/CController.php","line":308,"function":"runWithParams","class":"Survey_Common_Action","type":"->"},{"file":"\/var\/www\/html\/framework\/web\/CController.php","line":286,"function":"runAction","class":"CController","type":"->"},{"file":"\/var\/www\/html\/framework\/web\/CController.php","line":265,"function":"runActionWithFilters","class":"CController","type":"->"},{"file":"\/var\/www\/html\/application\/controllers\/AdminController.php","line":180,"function":"run","class":"CController","type":"->"},{"file":"\/var\/www\/html\/framework\/web\/CWebApplication.php","line":282,"function":"run","class":"AdminController","type":"->"},{"file":"\/var\/www\/html\/framework\/web\/CWebApplication.php","line":141,"function":"runController","class":"CWebApplication","type":"->"},{"file":"\/var\/www\/html\/framework\/base\/CApplication.php","line":185,"function":"processRequest","class":"CWebApplication","type":"->"},{"file":"\/var\/www\/html\/index.php","line":182,"function":"run","class":"CApplication","type":"->"}]},"redirectTo":"\/index.php\/admin\/questioneditor\/sa\/view\/surveyid\/546757\/gid\/8\/qid\/33"} |
|
Please update to the latest version and try again. Thank you. |
|
No change in my case after upgrading this morning. if it isnt actually related i can open a new bug report. Same 500 error: {"JSON":{"success":false,"message":"Question has been stored, but an error happened: \nAnswer option couldn't be saved. Error: Array\n(\n [code] => Array\n (\n [0] => Answer codes must be unique by question\n )\n\n)\n","error":{"code":500,"type":"LSJsonException","errorCode":0,"message":"Question has been stored, but an error happened: \nAnswer option couldn't be saved. Error: Array\n(\n [code] => Array\n (\n [0] => Answer codes must be unique by question\n )\n\n)\n","file":"/var/www/html/application/controllers/admin/questionedit.php","line":297,"trace":"#0 [internal function]: questionedit->saveQuestionData()\n#1 /var/www/html/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs()\n#2 /var/www/html/application/core/Survey_Common_Action.php(86): CAction->runWithParamsInternal()\n#3 /var/www/html/framework/web/CController.php(308): Survey_Common_Action->runWithParams()\n#4 /var/www/html/framework/web/CController.php(286): CController->runAction()\n#5 /var/www/html/framework/web/CController.php(265): CController->runActionWithFilters()\n#6 /var/www/html/application/controllers/AdminController.php(180): CController->run()\n#7 /var/www/html/framework/web/CWebApplication.php(282): AdminController->run()\n#8 /var/www/html/framework/web/CWebApplication.php(141): CWebApplication->runController()\n#9 /var/www/html/framework/base/CApplication.php(185): CWebApplication->processRequest()\n#10 /var/www/html/index.php(182): CApplication->run()\n#11 {main}","traces":[{"function":"saveQuestionData","class":"questionedit","type":"->","file":"unknown","line":0},{"file":"/var/www/html/framework/web/actions/CAction.php","line":109,"function":"invokeArgs","class":"ReflectionMethod","type":"->"},{"file":"/var/www/html/application/core/Survey_Common_Action.php","line":86,"function":"runWithParamsInternal","class":"CAction","type":"->"},{"file":"/var/www/html/framework/web/CController.php","line":308,"function":"runWithParams","class":"Survey_Common_Action","type":"->"},{"file":"/var/www/html/framework/web/CController.php","line":286,"function":"runAction","class":"CController","type":"->"},{"file":"/var/www/html/framework/web/CController.php","line":265,"function":"runActionWithFilters","class":"CController","type":"->"},{"file":"/var/www/html/application/controllers/AdminController.php","line":180,"function":"run","class":"CController","type":"->"},{"file":"/var/www/html/framework/web/CWebApplication.php","line":282,"function":"run","class":"AdminController","type":"->"},{"file":"/var/www/html/framework/web/CWebApplication.php","line":141,"function":"runController","class":"CWebApplication","type":"->"},{"file":"/var/www/html/framework/base/CApplication.php","line":185,"function":"processRequest","class":"CWebApplication","type":"->"},{"file":"/var/www/html/index.php","line":182,"function":"run","class":"CApplication","type":"->"}]},"redirectTo":"/index.php/admin/questioneditor/sa/view/surveyid/546757/gid/8/qid/33"},"Response Payload":{"EDITOR_CONFIG":{"text":"{\"success\":false,\"message\":\"Question has been stored, but an error happened: \nAnswer option couldn't be saved. Error: Array\n(\n [code] => Array\n (\n [0] => Answer codes must be unique by question\n )\n\n)\n\",\"error\":{\"code\":500,\"type\":\"LSJsonException\",\"errorCode\":0,\"message\":\"Question has been stored, but an error happened: \nAnswer option couldn't be saved. Error: Array\n(\n [code] => Array\n (\n [0] => Answer codes must be unique by question\n )\n\n)\n\",\"file\":\"\/var\/www\/html\/application\/controllers\/admin\/questionedit.php\",\"line\":297,\"trace\":\"#0 [internal function]: questionedit->saveQuestionData()\n#1 \/var\/www\/html\/framework\/web\/actions\/CAction.php(109): ReflectionMethod->invokeArgs()\n#2 \/var\/www\/html\/application\/core\/Survey_Common_Action.php(86): CAction->runWithParamsInternal()\n#3 \/var\/www\/html\/framework\/web\/CController.php(308): Survey_Common_Action->runWithParams()\n#4 \/var\/www\/html\/framework\/web\/CController.php(286): CController->runAction()\n#5 \/var\/www\/html\/framework\/web\/CController.php(265): CController->runActionWithFilters()\n#6 \/var\/www\/html\/application\/controllers\/AdminController.php(180): CController->run()\n#7 \/var\/www\/html\/framework\/web\/CWebApplication.php(282): AdminController->run()\n#8 \/var\/www\/html\/framework\/web\/CWebApplication.php(141): CWebApplication->runController()\n#9 \/var\/www\/html\/framework\/base\/CApplication.php(185): CWebApplication->processRequest()\n#10 \/var\/www\/html\/index.php(182): CApplication->run()\n#11 {main}\",\"traces\":[{\"function\":\"saveQuestionData\",\"class\":\"questionedit\",\"type\":\"->\",\"file\":\"unknown\",\"line\":0},{\"file\":\"\/var\/www\/html\/framework\/web\/actions\/CAction.php\",\"line\":109,\"function\":\"invokeArgs\",\"class\":\"ReflectionMethod\",\"type\":\"->\"},{\"file\":\"\/var\/www\/html\/application\/core\/Survey_Common_Action.php\",\"line\":86,\"function\":\"runWithParamsInternal\",\"class\":\"CAction\",\"type\":\"->\"},{\"file\":\"\/var\/www\/html\/framework\/web\/CController.php\",\"line\":308,\"function\":\"runWithParams\",\"class\":\"Survey_Common_Action\",\"type\":\"->\"},{\"file\":\"\/var\/www\/html\/framework\/web\/CController.php\",\"line\":286,\"function\":\"runAction\",\"class\":\"CController\",\"type\":\"->\"},{\"file\":\"\/var\/www\/html\/framework\/web\/CController.php\",\"line\":265,\"function\":\"runActionWithFilters\",\"class\":\"CController\",\"type\":\"->\"},{\"file\":\"\/var\/www\/html\/application\/controllers\/AdminController.php\",\"line\":180,\"function\":\"run\",\"class\":\"CController\",\"type\":\"->\"},{\"file\":\"\/var\/www\/html\/framework\/web\/CWebApplication.php\",\"line\":282,\"function\":\"run\",\"class\":\"AdminController\",\"type\":\"->\"},{\"file\":\"\/var\/www\/html\/framework\/web\/CWebApplication.php\",\"line\":141,\"function\":\"runController\",\"class\":\"CWebApplication\",\"type\":\"->\"},{\"file\":\"\/var\/www\/html\/framework\/base\/CApplication.php\",\"line\":185,\"function\":\"processRequest\",\"class\":\"CWebApplication\",\"type\":\"->\"},{\"file\":\"\/var\/www\/html\/index.php\",\"line\":182,\"function\":\"run\",\"class\":\"CApplication\",\"type\":\"->\"}]},\"redirectTo\":\"\/index.php\/admin\/questioneditor\/sa\/view\/surveyid\/546757\/gid\/8\/qid\/33\"}","mode":"application/json"}}} |
|
Can you please send us the .lss file? Is somehow random order enabled? |
|
For my case it happens on every survey, but i attached the one that started us on the journey. Random is not on. |
|
It's because of the |
|
Hi, I have a similar issue which I have reported in https://bugs.limesurvey.org/view.php?id=16313 (can only add answer options or modify the present ones by changing the question codes to new ones) |
|
I closed this ticket since no feedback has been provided. I marked 16313 as confirmed. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2020-04-16 22:38 | PedaBa | New Issue | |
2020-04-21 21:51 | davidrgl | Note Added: 57298 | |
2020-04-22 11:07 | ollehar | Note Added: 57309 | |
2020-04-22 11:07 | ollehar | Status | new => feedback |
2020-04-22 16:20 | davidrgl | Note Added: 57321 | |
2020-05-06 16:10 | cdorin | Note Added: 57594 | |
2020-05-06 19:43 | davidrgl | Note Added: 57599 | |
2020-05-06 19:43 | davidrgl | File Added: surveys_archive(1).zip | |
2020-05-07 12:13 | ollehar | Note Added: 57604 | |
2020-05-07 12:13 | ollehar | Priority | none => normal |
2020-05-07 12:13 | ollehar | Severity | partial_block => crash |
2020-05-20 13:07 | larjona | Note Added: 57954 | |
2020-07-29 22:44 | cdorin | Status | feedback => closed |
2020-07-29 22:44 | cdorin | Resolution | open => no change required |
2020-07-29 22:44 | cdorin | Note Added: 59178 |