View Issue Details

IDProjectCategoryView StatusLast Update
13163Bug reports[All Projects] _ Unknownpublic2018-01-15 10:38
ReporterpeddaAssigned Toolle 
PrioritynoneSeveritycrash 
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary13163: cant add answer options to "single choice Questions"
Description

Hello, When I add a Question, for example "Single choice question - List" and klick on "You need to add answer options to this question" I get the error message:

Internal Server Error
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field 'assessment_value' doesn't have a default value

Its a fresh installation and ComfordUpdate says its up to date. It looks like a bug, because when I create a "Multiple choice Question" I´m able to add answer options. Also if I click on a question on "Structure" I get the error message:

Forbidden
Invalid question id
You do not have the proper credential to access this page.

Additional Information

infophp.php attached

TagsNo tags attached.
Complete LimeSurvey version number (& build)limesurvey3.0.2+180110
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database & DB-Versionmysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
Operating System (Server)Ubuntu 16.04.3 LTS
Webserver software & versionServer version: Apache/2.4.18 (Ubuntu)
PHP Versionphp7.0

Relationships

has duplicate 13170 closedolle Database error when attempting to enter answer option for radio question (mssql) 

Activities

pedda

pedda

2018-01-11 12:40

reporter  

infophp.pdf (659,949 bytes)
olle

olle

2018-01-11 16:28

administrator   ~45562

Please attach a survey which reproduces this error.

olle

olle

2018-01-11 16:34

administrator   ~45563

Can you also run "mysql --version" in the terminal? LS requires MySQL 5.5.3.

pedda

pedda

2018-01-11 16:39

reporter   ~45564

The survey is attached.

Thats the output von "mysql --version":

mysql Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using EditLine wrapper



limesurvey_survey_795781.lss (12,024 bytes)
olle

olle

2018-01-12 11:25

administrator   ~45570

The bug in the question tree leading to "forbidden" message has been fixed, it will be in next release 3.0.3.

olle

olle

2018-01-12 11:26

administrator   ~45571

I still cannot reproduce your other bug. What I'm doing:

  1. Fresh install of 3.0.2, new database.
  2. Import survey.
  3. List questions.
  4. Click on overview of question.
  5. Edit answer options.
  6. Add one answer option.
  7. Click save.
  8. Everything is OK.

Did you activate the survey? Did you activate assessment mode?

pedda

pedda

2018-01-12 12:12

reporter   ~45580

No the survey isnt actived. When I try to actived assessment mode I get ther error message:

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field 'scope' doesn't have a default value

pedda

pedda

2018-01-12 12:24

reporter   ~45582

Also when I try to "Add one answer option" in "You need to add answer options to this question" OSSEC sends me the warning:

OSSEC HIDS Notification.

Received From: ubuntu->/var/log/apache2/access.log
Rule: 31122 fired (level 5) -> "Web server 500 error code (Internal Error)."
Src IP:
Portion of the log(s):

192.168.local.IP - - [12/Jan/2018:12:12:11 +0100] "POST /limesurvey/index.php/admin/assessments/sa/index/surveyid/557299 HTTP/1.1" 500 1528 "http://192.168.local.IP/limesurvey/index.php/admin/assessments?action=asessementactivate&surveyid=557299" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0"

I dont know if this is helpful. I tryed limesurvey creating a own mysql database set and doing it manuelly, but it doesnt make a difference.

pedda

pedda

2018-01-12 12:31

reporter   ~45583

Wrong, the OSSEC Notification came when tryed to actived assessment mode. This Notification comes when trying to add aswer options to a question:

Received From: ubuntu->/var/log/apache2/access.log
Rule: 31122 fired (level 5) -> "Web server 500 error code (Internal Error)."
Src IP: 192.168.X.X
Portion of the log(s):

192.168.X.X - - [12/Jan/2018:12:28:07 +0100] "GET /limesurvey/index.php/admin/questions/sa/answeroptions/surveyid/557299/gid/16/qid/164 HTTP/1.1" 500 1539 "http://192.168.X.X/limesurvey/index.php/admin/questions/sa/view/surveyid/557299/gid/16/qid/164" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0"

olle

olle

2018-01-12 12:35

administrator   ~45585

Can you run this query in your database, please?

SELECT @@GLOBAL.sql_mode;

And print the answer here.

olle

olle

2018-01-12 14:35

administrator   ~45587

I could reproduce this issue after updating MySQL from 5.5. to 5.6.

olle

olle

2018-01-12 14:41

administrator   ~45588

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

pedda

pedda

2018-01-12 19:10

reporter   ~45592

mysql> SELECT @@GLOBAL.sql_mode;
+-------------------------------------------------------------------------------------------------------------------------------------------+
| @@GLOBAL.sql_mode |
+-------------------------------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

pedda

pedda

2018-01-12 19:19

reporter   ~45593

Oh my god, after running the command in the query its working now. Thank you so much Olle! I cant believe it! If I would know you personally I would give you a case of beer!

c_schmitz

c_schmitz

2018-01-15 10:33

administrator   ~45604

Version 3.0.3 released.

olle

olle

2018-01-15 10:38

administrator   ~45639

@pedda, well, I'd also have to give you a case of beer, because I'm the one who caused this bug when I was fixing another issue some months ago. :) Anyway, glad it's working, and thank you for reporting!

Related Changesets

LimeSurvey: master b503d02f

2018-01-12 14:40:33

olle

Details Diff
Fixed issue 13163: Can't add answer option to Single Choice Question
mod - application/controllers/admin/questions.php Diff File

Issue History

Date Modified Username Field Change
2018-01-11 12:40 pedda New Issue
2018-01-11 12:40 pedda File Added: infophp.pdf
2018-01-11 16:28 olle Assigned To => olle
2018-01-11 16:28 olle Status new => assigned
2018-01-11 16:28 olle Status assigned => feedback
2018-01-11 16:28 olle Note Added: 45562
2018-01-11 16:34 olle Note Added: 45563
2018-01-11 16:39 pedda File Added: limesurvey_survey_795781.lss
2018-01-11 16:39 pedda Note Added: 45564
2018-01-11 16:39 pedda Status feedback => assigned
2018-01-12 11:25 olle Note Added: 45570
2018-01-12 11:26 olle Note Added: 45571
2018-01-12 11:26 olle Status assigned => feedback
2018-01-12 12:12 pedda Note Added: 45580
2018-01-12 12:12 pedda Status feedback => assigned
2018-01-12 12:24 pedda Note Added: 45582
2018-01-12 12:31 pedda Note Added: 45583
2018-01-12 12:35 olle Note Added: 45585
2018-01-12 14:35 olle Note Added: 45587
2018-01-12 14:35 olle Status assigned => confirmed
2018-01-12 14:41 olle Changeset attached => LimeSurvey master b503d02f
2018-01-12 14:41 olle Note Added: 45588
2018-01-12 14:41 olle Resolution open => fixed
2018-01-12 14:42 olle Status confirmed => resolved
2018-01-12 14:42 olle Fixed in Version => 3.0.3
2018-01-12 15:24 olle Relationship added has duplicate 13170
2018-01-12 19:10 pedda Note Added: 45592
2018-01-12 19:19 pedda Note Added: 45593
2018-01-15 10:33 c_schmitz Note Added: 45604
2018-01-15 10:33 c_schmitz Status resolved => closed
2018-01-15 10:38 olle Note Added: 45639