View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
13163Bug reports_ Unknownpublic2018-01-15 10:38
Reporterpedda Assigned Toollehar  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
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.
Attached Files
infophp.pdf (659,949 bytes)
Bug heat14
Complete LimeSurvey version number (& build)limesurvey3.0.2+180110
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database type & versionmysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
Server OS (if known)Ubuntu 16.04.3 LTS
Webserver software & version (if known)Server version: Apache/2.4.18 (Ubuntu)
PHP Versionphp7.0

Relationships

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

Users monitoring this issue

pedda

Activities

ollehar

ollehar

2018-01-11 16:28

administrator   ~45562

Please attach a survey which reproduces this error.

ollehar

ollehar

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

ollehar

ollehar

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.

ollehar

ollehar

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"

ollehar

ollehar

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.

ollehar

ollehar

2018-01-12 14:35

administrator   ~45587

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

ollehar

ollehar

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.

ollehar

ollehar

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

ollehar

Details Diff
Fixed issue 13163: Can't add answer option to Single Choice Question Affected Issues
13163
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 12:42 pedda Issue Monitored: pedda
2018-01-11 16:28 ollehar Assigned To => ollehar
2018-01-11 16:28 ollehar Status new => assigned
2018-01-11 16:28 ollehar Status assigned => feedback
2018-01-11 16:28 ollehar Note Added: 45562
2018-01-11 16:34 ollehar 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 ollehar Note Added: 45570
2018-01-12 11:26 ollehar Note Added: 45571
2018-01-12 11:26 ollehar 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 ollehar Note Added: 45585
2018-01-12 14:35 ollehar Note Added: 45587
2018-01-12 14:35 ollehar Status assigned => confirmed
2018-01-12 14:41 ollehar Changeset attached => LimeSurvey master b503d02f
2018-01-12 14:41 ollehar Note Added: 45588
2018-01-12 14:41 ollehar Resolution open => fixed
2018-01-12 14:42 ollehar Status confirmed => resolved
2018-01-12 14:42 ollehar Fixed in Version => 3.0.3
2018-01-12 15:24 ollehar 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 ollehar Note Added: 45639
2021-08-02 22:34 guest Bug heat 12 => 14