View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
11139Bug reportsSurvey editingpublic2016-06-17 08:45
ReporterFHwebm01 Assigned ToLouisGac 
PriorityurgentSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.50.x 
Summary11139: Subquestion: add error, more than 1 subquestion will be added
Description

If I add a subquestion, it will be ok until I reached the 4th subquestion.
After that, when I add a 5th subquestion, there are two 5th subquestions added. If I add a 6th subquestion, there are three 6th subquestions added.
And so on...

Steps To Reproduce

Add 4 subquestions and then add a 5th and 6th subquestion.

Additional Information

Here you can see a video of the process:
https://youtu.be/Hz0j-1HMRgs

TagsNo tags attached.
Attached Files
hc_001.jpg (739,492 bytes)
Bug heat8
Complete LimeSurvey version number (& build)Version 2.50+ Build 160506
I will donate to the project if issue is resolvedNo
BrowserFirefox 45.0.2 (but tried it in Google Chrome and IE too, same problem)
Database type & versionmySQL 5.7
Server OS (if known)Windows 2012 R2 Server
Webserver software & version (if known)IIS 8.5
PHP VersionPHP Version 7.0.5

Relationships

related to 11320 closedLouisGac When clicking "Insert new answer option" Two new rows are added to the answers table 

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2016-05-09 16:23

administrator   ~38265

I can reproduce.

ollehar

ollehar

2016-05-11 17:00

administrator   ~38370

How is how I reproduce now:

  1. Edit subquestions
  2. Add one using "Quick add"
  3. Add another using single add (next to each subquestion row)
  4. Two subquestions are added
FHwebm01

FHwebm01

2016-05-18 09:11

reporter   ~38659

Any News?

c_schmitz

c_schmitz

2016-05-18 10:25

administrator   ~38660

Last edited: 2016-05-18 10:31

This should be resolved in the latest version in general, however we have to refactor it codewise so for now the ticket stays open.

LouisGac

LouisGac

2016-05-18 10:30

developer   ~38661

Last edited: 2016-05-18 10:30

Yep, I put back the old code.

The problems was that subquestions/answers was having different logic and different HTML. The related javascript files was injecting a lot of HTML, directly written in each javascript function.
 
Now, we started to write an AJAX process: the server use a html view for each line, and the javascript call the server to get it (and the server is doing all the needed calculations in PHP rather than the webbrowser in JavaScript ). So all the HTML will be generated from a single place. At the same time, we're trying to get a single JavaScript file for subquestions and answers.

The new version will be released soon.

FHwebm01

FHwebm01

2016-05-18 10:47

reporter   ~38662

ok, thank you

LouisGac

LouisGac

2016-06-07 12:42

developer   ~39276

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

FHwebm01

FHwebm01

2016-06-10 12:31

reporter   ~39401

Hello,

same problem with the "edit answer options" !!!

Current version!

Kind regards,

Klaus

LouisGac

LouisGac

2016-06-10 12:40

developer   ~39402

how did you applied the fix? Git pull ?

FHwebm01

FHwebm01

2016-06-13 10:48

reporter   ~39449

Same problem with question types "List (radio)" and "List (dropdown)" AND I cannot save the answer option (BIGGER PROBLEM and VERY URGENTLY)!!!

LouisGac

LouisGac

2016-06-13 10:48

developer   ~39450

The bug has been fixed, but the fix has not been released yet.

FHwebm01

FHwebm01

2016-06-13 11:02

reporter   ~39453

Where is the fix for this bug:
I cannot save the answer option (BIGGER PROBLEM and VERY URGENTLY)

?

That is a big bug, why has it not been released yet?

LouisGac

LouisGac

2016-06-13 11:31

developer   ~39455

I remember about the "save answer options" bug, and if I remember well, we immediatly provided a fix and did a release.

FHwebm01

FHwebm01

2016-06-13 11:33

reporter   ~39456

But as you can see in my screenshot, it is NOT working...

LouisGac

LouisGac

2016-06-13 11:37

developer   ~39457

Confirmed, here the fix for the "save" problem :
https://github.com/LimeSurvey/LimeSurvey/commit/a55996afa17470bccd129211c73e906380252608

released in 160602

Being a js problem, if you have debug mode "on" (then, asset manager off), you must refresh your browser cache.

FHwebm01

FHwebm01

2016-06-13 11:39

reporter   ~39460

Ok, I will try this fix for the "save" problem, but I have "Version 2.50+ Build 160606" and it is not working. So, the fix could be changed back maybe...?

LouisGac

LouisGac

2016-06-13 11:42

developer   ~39462

Like I said, I'd bet it's a cache browser issue.
Whatever, we'll release the new version today.

FHwebm01

FHwebm01

2016-06-13 11:46

reporter   ~39463

Found the bug:

In answers.js is at lint 197 not this, like you have it in your solution:

  • $scaleId = $(this).data('scale-id')

There is:
$datas += '&scale_id='+$(this).data('scale-id');

So, the problem is the "scale_id". If I change this to "scaleID", it works!

FHwebm01

FHwebm01

2016-06-13 11:50

reporter   ~39464

No, that was not the solution... :(

If I save the default single answer option it is ok, but if I change it or add another one, it is still the same "save" error...

FHwebm01

FHwebm01

2016-06-13 11:55

reporter   ~39465

Ok, thank your the new release today!

c_schmitz

c_schmitz

2016-06-13 12:26

administrator   ~39470

Version 2.50 Build 160613 released

FHwebm01

FHwebm01

2016-06-13 13:09

reporter   ~39513

Looks good now

LouisGac

LouisGac

2016-06-13 13:13

developer   ~39514

good to know !
thank you for the feedbacks

FHwebm01

FHwebm01

2016-06-13 13:17

reporter   ~39515

Hello,

but the save problem of the answer options for "List (dropdown)" and "List (radiobuttons) is still there.

If I use the default "Code" for the answer options (A1, A2, ...) and just change the "text", it is ok.

But if I want to change the the "Code", it is not working...

Bye

FHwebm01

FHwebm01

2016-06-13 13:19

reporter   ~39516

And if I save e.g. 3 answer options with A1/A2/A3 - Codes, it is ok.
But if I change the codes to my own, it deletes all answer options too...

LouisGac

LouisGac

2016-06-13 13:20

developer   ~39517

ok, could you please open a specific bug report for that one?

c_schmitz

c_schmitz

2016-06-13 13:20

administrator   ~39518

See 11154

FHwebm01

FHwebm01

2016-06-13 13:30

reporter   ~39522

Because LouisGac asked for it, here it is:
https://bugs.limesurvey.org/view.php?id=11371

c_schmitz

c_schmitz

2016-06-17 08:45

administrator   ~39645

Version 2.50+ Build 160616 released

Related Changesets

LimeSurvey: master 01a4c56e

2016-06-07 09:37:34

LouisGac

Details Diff
Fixed issue 11320: When clicking "Insert new answer option" Two new rows are added to the answers table
Fixed issue 11139: Subquestion: add error, more than 1 subquestion will be added
Affected Issues
11139, 11320
mod - application/views/admin/survey/Question/answerOptions_view.php Diff File
mod - application/views/admin/survey/Question/subquestionsAndAnswers/_answer_option.php Diff File
mod - scripts/admin/answers.js Diff File

Issue History

Date Modified Username Field Change
2016-05-09 11:27 FHwebm01 New Issue
2016-05-09 11:27 FHwebm01 File Added: limesurvey_survey_813183.lss
2016-05-09 15:03 DenisChenu Relationship added related to 11137
2016-05-09 15:04 DenisChenu Relationship deleted related to 11137
2016-05-09 16:23 c_schmitz Note Added: 38265
2016-05-09 16:23 c_schmitz Priority none => urgent
2016-05-11 17:00 ollehar Note Added: 38370
2016-05-11 17:00 ollehar Assigned To => ollehar
2016-05-11 17:00 ollehar Status new => assigned
2016-05-11 17:20 ollehar Assigned To ollehar =>
2016-05-11 17:20 ollehar Assigned To => ollehar
2016-05-11 17:20 ollehar Status assigned => new
2016-05-11 17:21 ollehar Assigned To ollehar =>
2016-05-12 11:18 c_schmitz Assigned To => LouisGac
2016-05-12 11:18 c_schmitz Status new => assigned
2016-05-12 14:22 LouisGac Sticky Issue No => Yes
2016-05-12 16:18 LouisGac Sticky Issue Yes => No
2016-05-18 09:11 FHwebm01 Note Added: 38659
2016-05-18 10:25 c_schmitz Note Added: 38660
2016-05-18 10:30 LouisGac Note Added: 38661
2016-05-18 10:30 LouisGac Note Edited: 38661
2016-05-18 10:31 c_schmitz Note Edited: 38660
2016-05-18 10:47 FHwebm01 Note Added: 38662
2016-06-07 10:10 LouisGac Sticky Issue No => Yes
2016-06-07 10:10 LouisGac Relationship added related to 11320
2016-06-07 12:42 LouisGac Changeset attached => LimeSurvey master 01a4c56e
2016-06-07 12:42 LouisGac Note Added: 39276
2016-06-07 12:42 LouisGac Resolution open => fixed
2016-06-07 12:44 LouisGac Status assigned => resolved
2016-06-07 12:45 LouisGac Sticky Issue Yes => No
2016-06-10 12:31 FHwebm01 Note Added: 39401
2016-06-10 12:31 FHwebm01 Status resolved => feedback
2016-06-10 12:31 FHwebm01 Resolution fixed => reopened
2016-06-10 12:40 LouisGac Note Added: 39402
2016-06-13 10:46 FHwebm01 File Added: hc_001.jpg
2016-06-13 10:48 FHwebm01 Note Added: 39449
2016-06-13 10:48 FHwebm01 Status feedback => assigned
2016-06-13 10:48 LouisGac Note Added: 39450
2016-06-13 10:48 LouisGac Status assigned => resolved
2016-06-13 10:48 LouisGac Resolution reopened => fixed
2016-06-13 11:02 FHwebm01 Note Added: 39453
2016-06-13 11:31 LouisGac Note Added: 39455
2016-06-13 11:33 FHwebm01 Note Added: 39456
2016-06-13 11:37 LouisGac Note Added: 39457
2016-06-13 11:39 FHwebm01 Note Added: 39460
2016-06-13 11:42 LouisGac Note Added: 39462
2016-06-13 11:46 FHwebm01 Note Added: 39463
2016-06-13 11:50 FHwebm01 Note Added: 39464
2016-06-13 11:55 FHwebm01 Note Added: 39465
2016-06-13 12:26 c_schmitz Note Added: 39470
2016-06-13 12:26 c_schmitz Status resolved => closed
2016-06-13 13:07 FHwebm01 Status closed => feedback
2016-06-13 13:07 FHwebm01 Resolution fixed => reopened
2016-06-13 13:09 FHwebm01 Note Added: 39513
2016-06-13 13:09 FHwebm01 Status feedback => assigned
2016-06-13 13:13 LouisGac Note Added: 39514
2016-06-13 13:14 LouisGac Status assigned => closed
2016-06-13 13:14 LouisGac Resolution reopened => fixed
2016-06-13 13:17 FHwebm01 Note Added: 39515
2016-06-13 13:17 FHwebm01 Status closed => feedback
2016-06-13 13:17 FHwebm01 Resolution fixed => reopened
2016-06-13 13:19 FHwebm01 Note Added: 39516
2016-06-13 13:19 FHwebm01 Status feedback => assigned
2016-06-13 13:20 LouisGac Note Added: 39517
2016-06-13 13:20 c_schmitz Note Added: 39518
2016-06-13 13:21 c_schmitz Status assigned => closed
2016-06-13 13:21 c_schmitz Resolution reopened => fixed
2016-06-13 13:21 c_schmitz Fixed in Version => 2.5
2016-06-13 13:30 FHwebm01 Note Added: 39522
2016-06-13 13:30 FHwebm01 Status closed => feedback
2016-06-13 13:30 FHwebm01 Resolution fixed => reopened
2016-06-13 14:24 LouisGac Sticky Issue No => Yes
2016-06-15 11:05 LouisGac Status feedback => resolved
2016-06-15 11:05 LouisGac Resolution reopened => fixed
2016-06-15 15:27 c_schmitz Sticky Issue Yes => No
2016-06-17 08:45 c_schmitz Note Added: 39645
2016-06-17 08:45 c_schmitz Status resolved => closed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing