View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
11516Bug reportsSurvey takingpublic2016-08-10 14:45
Reportervkuzmin Assigned Tomarkusfluer 
PriorityurgentSeverityminor 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.50.x 
Summary11516: Sliders (Multiple numerical input). It's possible continue without answering to mandatory question.
Description

There's special hidden field to check user activity, for example:
<input type="hidden" name="slider_user_no_action_843245X100X2270SQ002" id="slider_user_no_action_843245X100X2270SQ002" value="1" />

When respondent change slider value first time special hidden field value is set to 0.

Limesurvey check that field and if its value is "1" respondent will get an error and should set any value next time.

But after submitting when survey is shown again with error message ALL that field now have default "0" value instead of correct values from last try. So respondent can click Submit button twice and continue without answering.

Steps To Reproduce

1) Make "Multiple numerical input" question.
2) Set "Use slider layout" to "Yes" in "Advanced settings" - "Slider".
3) Click
3) Add some subquestions (press "Save and close" and then "Edit subquestions")
4) Run this survey until you see your question with sliders.
5) Press "Submit" or "Next" button twice.
6) Minimal slider's value will be saved as your answer.

TagsNo tags attached.
Attached Files
Fix-with-new-js.png (12,163 bytes)   
Fix-with-new-js.png (12,163 bytes)   
Fix-with-old-js1.png (8,061 bytes)   
Fix-with-old-js1.png (8,061 bytes)   
Fix-with-old-js2.png (13,059 bytes)   
Fix-with-old-js2.png (13,059 bytes)   
Bug heat10
Complete LimeSurvey version number (& build)160728
I will donate to the project if issue is resolvedNo
BrowserFirefox, Chrome
Database type & versionmysqlnd 5.0.10 - 20111026
Server OS (if known)Windows 10
Webserver software & version (if known)Apache/2.4.6 (Win32)
PHP VersionPHP/5.4.17

Users monitoring this issue

vkuzmin

Activities

vkuzmin

vkuzmin

2016-08-02 12:21

reporter   ~40164

Step 3 should be:
Set "Mandatory" to "On" in "General options"

markusfluer

markusfluer

2016-08-04 16:59

administrator   ~40171

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

vkuzmin

vkuzmin

2016-08-05 13:54

reporter   ~40191

Thank you a lot!
But looks like new 9.1.1 of bootstrap-slider.js isnt compatible and cause new bugs. When i've tried to use your fix with old 7.0.1 from the last stable build it was fine.

Works:
mod - application/helpers/qanda_helper.php
mod - application/views/survey/questions/multiplenumeric/rows/sliders/answer_row.php

Cause new bugs:
mod - third_party/bootstrap-slider/bootstrap-slider.js
mod - third_party/bootstrap-slider/bootstrap-slider.min.js

vkuzmin

vkuzmin

2016-08-05 14:06

reporter   ~40192

Uploaded some screenshoots with your changes and two versions of bootstrap-slider.js

vkuzmin

vkuzmin

2016-08-05 14:16

reporter   ~40193

new 9.1.1 verson of bootstrap-slider.js cause bugs. Need more changes or roll back to the bootstrap-slider.js v. 7.0.1.

LouisGac

LouisGac

2016-08-05 15:01

developer   ~40195

Last edited: 2016-08-05 15:10

so after clarification:

it seems that there the commit :
https://github.com/LimeSurvey/LimeSurvey/commit/9bd89f30f0b890c3208f0a3214af805559337094#commitcomment-18535323

is mixing the update and the hack. As said in the comment, please separate the operations in two commits so we can keep a clear trace of the hack.

If the hack can be avoid: better.

markusfluer

markusfluer

2016-08-08 10:26

administrator   ~40198

After closer examination and just to clarify, the old 7.1.1 bootstrap slider states that it cannot work with non-numeric values. Which as it seems in not correct.
I did not change a line of the bootstrap-slider.js or -.min.js. All I did was heave it to the latest version and fix our coe to return 'null' on no-input.

I cannot really reproduce the issue, so you would be so kind to show me the output of your debug console, though I could see where the error occurs in your system.

vkuzmin

vkuzmin

2016-08-08 16:11

reporter   ~40205

Last edited: 2016-08-08 17:22

Fresh installation of Limesurvey from Github without any changes. Last commit: https://github.com/LimeSurvey/LimeSurvey/commit/457cdbac944edd72dde297caf245c7cca0963101
9.1.1 version of bootstrap.js
Survey: https://bugs.limesurvey.org/file_download.php?file_id=8318&amp;type=bug

1) Old chrome on win 7 (Chrome/38.0.2125.111) https://aboutmybrowser.com/MvMuXTt2
Console:
bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead. bootstrap-slider.js:1627
Uncaught TypeError: Cannot read property '0' of null bootstrap-slider.js:767
Failed to load resource: net::ERR_CACHE_MISS http://192.168.100.7:8080/lime-git-160808/index.php/survey/index/sid/368443/newtest/Y/lang/en

2) Yandex browser on win 7 (Chrome/51.0.2704.106 YaBrowser/16.7.0.3342) https://aboutmybrowser.com/wjio0Lp5
Console:
bootstrap-slider.js:1627 bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead.
bootstrap-slider.js:767 Uncaught TypeError: Cannot read property '0' of null

3) Chrome 52 on win 10 (Chrome/52.0.2743.116) https://aboutmybrowser.com/QJQn4cwY
Console:
bootstrap-slider.js:1627 bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead.
bootstrap-slider.js:767 Uncaught TypeError: Cannot read property '0' of null

4) Firefox 48 on win 10 https://aboutmybrowser.com/dIQbxS82
Console:
bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead.bootstrap-slider.js:1627:6
TypeError: this._state.value is null
bootstrap-slider.js:767:6
The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page.

5) Firefox ESR 45 on win 10 https://aboutmybrowser.com/I2ldzrCm
Console:
bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead. bootstrap-slider.js:1627:6
TypeError: this._state.value is null
bootstrap-slider.js:767:6
API ведения логов веб-консоли (console.log, console.info, console.warn, console.error) был отключен скриптом на этой странице.

Later I'll try to run LimeSurvey on php 7 instead of 5.4.

And another bug with sliders (i'l make new issue later becouse current one is more important):
If you go to the question options-Advanced settings-Slider and set any value in "Slider initial value" or even set "Slider starts at the middle position" to "On" slider_user_no_action_368443X1X1SQ002 field appear with 0 instead of 1.

vkuzmin

vkuzmin

2016-08-09 11:45

reporter   ~40213

Last edited: 2016-08-09 12:51

https://github.com/seiyria/bootstrap-slider/releases
bootstrap-slider v 9.1.3 works fine, but need small change in CSS file to look like before (move slider handle 5px downside, or just use css from bootstrap-slider repository):

bootstrap-slider.css:
.slider.slider-horizontal .slider-tick,
.slider.slider-horizontal .slider-handle {
margin-left: -10px;
margin-top: -5px; / This string should be removed or set to 0px /
}

This issue can be closed now and i'l make new one about predefined slider position.

markusfluer

markusfluer

2016-08-09 13:11

administrator   ~40214

I have updated the css to use the latest github version

c_schmitz

c_schmitz

2016-08-10 14:45

administrator   ~40226

Version 2.50+ Build 160810 released

Related Changesets

LimeSurvey: master 9bd89f30

2016-08-04 14:53:24

markusfluer

Details Diff
Fixed issue 11516: Sliders (Multiple numerical input). It's possible continue without answering to mandatory question Affected Issues
11516
mod - application/helpers/qanda_helper.php Diff File
mod - application/views/survey/questions/multiplenumeric/rows/sliders/answer_row.php Diff File
mod - third_party/bootstrap-slider/bootstrap-slider.js Diff File
mod - third_party/bootstrap-slider/bootstrap-slider.min.js Diff File

Issue History

Date Modified Username Field Change
2016-08-02 11:57 vkuzmin New Issue
2016-08-02 12:15 vkuzmin Issue Monitored: vkuzmin
2016-08-02 12:21 vkuzmin Note Added: 40164
2016-08-02 12:22 vkuzmin File Added: limesurvey_survey_368443.lss
2016-08-04 16:54 markusfluer Status new => resolved
2016-08-04 16:54 markusfluer Fixed in Version => 2.5
2016-08-04 16:54 markusfluer Resolution open => fixed
2016-08-04 16:54 markusfluer Assigned To => markusfluer
2016-08-04 16:59 markusfluer Changeset attached => LimeSurvey master 9bd89f30
2016-08-04 16:59 markusfluer Note Added: 40171
2016-08-05 13:54 vkuzmin Note Added: 40191
2016-08-05 14:02 vkuzmin File Added: Fix-with-new-js.png
2016-08-05 14:02 vkuzmin File Added: Fix-with-old-js1.png
2016-08-05 14:02 vkuzmin File Added: Fix-with-old-js2.png
2016-08-05 14:06 vkuzmin Note Added: 40192
2016-08-05 14:16 vkuzmin Note Added: 40193
2016-08-05 14:16 vkuzmin Status resolved => feedback
2016-08-05 14:16 vkuzmin Resolution fixed => reopened
2016-08-05 15:01 LouisGac Note Added: 40195
2016-08-05 15:02 LouisGac Priority none => urgent
2016-08-05 15:10 LouisGac Note Edited: 40195
2016-08-08 10:26 markusfluer Note Added: 40198
2016-08-08 16:11 vkuzmin Note Added: 40205
2016-08-08 16:11 vkuzmin Status feedback => assigned
2016-08-08 17:11 vkuzmin Note Edited: 40205
2016-08-08 17:22 vkuzmin Note Edited: 40205
2016-08-08 17:22 vkuzmin Note Edited: 40205
2016-08-09 11:45 vkuzmin Note Added: 40213
2016-08-09 11:46 vkuzmin Note Edited: 40213
2016-08-09 11:53 vkuzmin Note Edited: 40213
2016-08-09 11:53 vkuzmin Note Edited: 40213
2016-08-09 11:53 vkuzmin Note Edited: 40213
2016-08-09 11:54 vkuzmin Note Edited: 40213
2016-08-09 11:54 vkuzmin Note Edited: 40213
2016-08-09 11:55 vkuzmin Note Edited: 40213
2016-08-09 12:51 vkuzmin Note Edited: 40213
2016-08-09 12:51 vkuzmin Note Edited: 40213
2016-08-09 13:11 markusfluer Note Added: 40214
2016-08-09 13:11 markusfluer Status assigned => resolved
2016-08-09 13:11 markusfluer Resolution reopened => fixed
2016-08-10 14:45 c_schmitz Note Added: 40226
2016-08-10 14:45 c_schmitz Status resolved => closed
2021-08-05 06:03 guest Bug heat 8 => 10