View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
08500Bug reportsSurvey takingpublic2014-03-18 08:06
ReporterTMSWhite Assigned Toc_schmitz  
PriorityhighSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary08500: most of the surveys in /docs/demosurveys no longer work properly
Description

Many of the ls2_*.lss surveys in LimeSurvey/docs/demosurveys no longer work correctly in 2.05. Especially, those that require dynamic, on-same-page updates (such as ls2_group_relevance.lss, ls2_countifof_sumifop.lss, and limesurvey2_sample_survey_english.lss) no longer work.

These surveys do work properly in 2.00plus_131206.

Steps To Reproduce

test any of the ls2_*.lss survey in /docs/demosurveys in 2.00 vs. 2.05 to see differences in behavior.

Additional Information

It appears that the Expression Manager-generated JavaScript is intact - so perhaps checkconditions() is no longer being called on each keystroke, tab, or click event.

TagsNo tags attached.
Bug heat14
Complete LimeSurvey version number (& build)81b8f55bea7888d37c2490b60fa7
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL
Server OS (if known)Windows 7 64 bit
Webserver software & version (if known)XAMPP 1.8.3
PHP Version5.5.6

Users monitoring this issue

DenisChenu, mfaber

Activities

DenisChenu

DenisChenu

2014-01-01 15:35

developer   ~27707

Due to new "Question code naming".

See: https://github.com/LimeSurvey/LimeSurvey/commit/4ded98eec374d39e7668a943d18db34118cbd795

TMSWhite

TMSWhite

2014-01-01 16:17

reporter   ~27708

That is a regression. Variable names should be allowed to contain underscores too. They should also be allowed to start with an underscore. Otherwise there is no reliable way to upgrade old surveys that use that valid 1.92+ naming convention.

DenisChenu

DenisChenu

2014-01-02 11:47

developer   ~27709

Last edited: 2014-01-02 19:19

http://www.limesurvey.org/irclogs/limesurvey-team/index.php?date=2013-12-03

PS: underscore are valid too in 2.0, not only in 1.92 ;)
PS2:
https://github.com/LimeSurvey/LimeSurvey/commit/4ded98eec374d39e7668a943d18db34118cbd795#commitcomment-4741089

Mazi

Mazi

2014-01-07 14:34

updater   ~27731

We definitely need to fix this and make it "somehow" backward compatible. I think this was discussed in length at the previous dev meetings. I just don't want users to update and find liots of their surveys broken

TMSWhite

TMSWhite

2014-01-08 05:46

reporter   ~27751

I read the team logs, and it isn't clear why underscores would be problematic for 2.05. I doubt that people would mix auto-generated and manually-generated variable names. If so, there is minimal risk of naming conflicts. Besides which, the Show Logic File functionality detects and highlights re-use of variable names, so if someone accidentally re-used a variable name, they could easily spot and fix the problem.

By contrast, some people, like me, routinely use underscores in variable names. So, disallowing underscores would break 90%+ of my surveys, and there is no easy or reliable way to convert those variable names to something else.

Mazi

Mazi

2014-01-08 11:23

updater   ~27757

I second this. About 80% of our users are using underscores so even though we have discussed that in length, maybe we can find a way to support underscores.

DenisChenu

DenisChenu

2014-01-08 12:22

developer   ~27760

Last edited: 2014-01-08 12:22

2 change between 2.00 good code (don't show alert in EM files)

  • Underscore in Question code and/or SubQuestion code
  • SubQUestion code starting by a numeric value : this one is due to Ranking question type.
DenisChenu

DenisChenu

2014-01-10 08:23

developer   ~27812

Deleted relation ship : #08514 are for 2.00 too : we test SubQuestion code case-insensitive in javascript only.

TMSWhite

TMSWhite

2014-01-26 17:12

reporter   ~28217

It sounds as though there may have been several major changes from 2.0 to 2.05, including:
(1) Disallowing underscores in variable names
(2) Disallowing use of purely numeric sub-question codes
(3) Case-insensitive sub-question code tests in JavaScript (Denis's note above)

All of these are actually major behavior changes for my surveys, and likely for many other users. I am still not clear on why these changes were thought to be needed -- I expect there must be a way to support backwards compatibility.

Regardless, I think this topic needs to be discussed/debated in the public forum, not just the developers and bug lists, since this will have a major impact on users.

DenisChenu

DenisChenu

2014-01-26 17:56

developer   ~28220

Hi Thom :
2: are removed in last update: only numeric in sub question code is allowed now
3: It's clearly a bug here , with sub question code Q1 and q1 give the same "column name" for mySQL. Maybe it's OK in msSQL and pgSQL, but most of our user use mySQL actually.

You really use same question code : example a1 and A1 (for same question) ? Never have problem ?

TMSWhite

TMSWhite

2014-02-05 18:10

reporter   ~28532

Carsten-

Glad you are working on this one, although I expect there are higher priorities. Please clarify why 2.05 and beyond would not be able to cope with underscores.

Expression Manger gracefully handles variable names that follow this pattern, so I'd expect 2.05 to be able to do the same:

/^[a-zA-Z][a-zA-Z0-9]*$/

c_schmitz

c_schmitz

2014-02-05 23:37

administrator   ~28533

Last edited: 2014-02-05 23:38

hi Thomas,
the long-term plan is to move away from the old SGQA naming (for example the field names in the response table) to unique question codes where the underscore will be reserved as separator character - that's why underscores will be obsolete in the future.

I am just converting the example surveys one by one trying to find a way to cleanly rename the variables inside the expression.

For condition based stuff it is easy to just recalculate the expression, for custom expressions you would not know an easy way to find and replace an old variable name for a new one? I guess a regex should be able to cover that.

c_schmitz

c_schmitz

2014-02-06 13:58

administrator   ~28541

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

c_schmitz

c_schmitz

2014-02-07 21:50

administrator   ~28566

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

c_schmitz

c_schmitz

2014-02-12 21:20

administrator   ~28682

2.05+ Build 140212 released

mdekker

mdekker

2014-03-18 08:06

reporter   ~29315

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

Related Changesets

LimeSurvey: master 0ff7befe

2014-02-05 10:30:19

c_schmitz

Details Diff
Fixed issue 08500: Example surveys not properly importing
Dev Partial fix - more to come
Affected Issues
08500
rm - docs/demosurveys/limesurvey2_sample_survey_english.lss Diff File
add - docs/demosurveys/ls205_sample_survey_english.lss Diff File

LimeSurvey: master 0c137af5

2014-02-07 20:12:29

c_schmitz

Details Diff
Fixed issue 08500: Example surveys not properly importing Affected Issues
08500
mod - application/helpers/admin/import_helper.php Diff File
mod - application/helpers/common_helper.php Diff File

LimeSurvey: master 57e1f4c6

2014-02-17 04:29:44

TMSWhite

Details Diff
Fixed issue 08500: Example surveys not properly importing Affected Issues
08500
mod - docs/demosurveys/ls205_array_filter_tests.lss Diff File

LimeSurvey: master ad46d0fe

2014-03-18 07:06:31

mdekker

Details Diff
Merge pull request #172 from TMSWhite/fix_2.05_demo_surveys

Fixed issue 08500: Example surveys not properly importing
Affected Issues
08500
mod - docs/demosurveys/ls205_array_filter_tests.lss Diff File

Issue History

Date Modified Username Field Change
2013-12-31 10:26 TMSWhite New Issue
2014-01-01 15:35 DenisChenu Note Added: 27707
2014-01-01 16:17 TMSWhite Note Added: 27708
2014-01-01 17:43 mfaber Issue Monitored: mfaber
2014-01-02 11:47 DenisChenu Note Added: 27709
2014-01-02 19:19 DenisChenu Note Edited: 27709
2014-01-07 14:33 Mazi Assigned To => sammousa
2014-01-07 14:33 Mazi Status new => assigned
2014-01-07 14:34 Mazi Note Added: 27731
2014-01-08 05:46 TMSWhite Note Added: 27751
2014-01-08 09:12 DenisChenu Issue Monitored: DenisChenu
2014-01-08 11:23 Mazi Note Added: 27757
2014-01-08 12:22 DenisChenu Note Added: 27760
2014-01-08 12:22 DenisChenu Note Edited: 27760
2014-01-10 08:23 DenisChenu Note Added: 27812
2014-01-26 15:24 sammousa Assigned To sammousa =>
2014-01-26 17:12 TMSWhite Note Added: 28217
2014-01-26 17:56 DenisChenu Note Added: 28220
2014-02-04 14:24 c_schmitz Assigned To => c_schmitz
2014-02-05 18:10 TMSWhite Note Added: 28532
2014-02-05 23:37 c_schmitz Note Added: 28533
2014-02-05 23:38 c_schmitz Note Edited: 28533
2014-02-06 13:58 c_schmitz Changeset attached => LimeSurvey master 0ff7befe
2014-02-06 13:58 c_schmitz Note Added: 28541
2014-02-06 13:58 c_schmitz Resolution open => fixed
2014-02-07 21:22 c_schmitz Status assigned => resolved
2014-02-07 21:22 c_schmitz Fixed in Version => 2.05+
2014-02-07 21:50 c_schmitz Changeset attached => LimeSurvey master 0c137af5
2014-02-07 21:50 c_schmitz Note Added: 28566
2014-02-12 21:20 c_schmitz Note Added: 28682
2014-02-12 21:20 c_schmitz Status resolved => closed
2014-03-18 08:06 TMSWhite Changeset attached => LimeSurvey master 57e1f4c6
2014-03-18 08:06 mdekker Changeset attached => LimeSurvey master ad46d0fe
2014-03-18 08:06 mdekker Note Added: 29315
2021-08-02 21:35 guest Bug heat 10 => 14