View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05683 | Bug reports | Other | public | 2012-01-23 16:06 | 2012-03-14 21:08 |
Reporter | tpartner | Assigned To | TMSWhite | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.92RC2 | ||||
Target Version | 1.92RC3 | Fixed in Version | 1.92RC3 | ||
Summary | 05683: Javascript errors with array-numbers question | ||||
Description | After updating from 1.91 to 1.92, EM causes JavaScript errors in the attached survey: syntax error - line 476 The survey consists of a single array-numbers question with default advanced settings and no custom JS. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 12464 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | FF | ||||
Database type & version | MySQL 5.1.41 | ||||
Server OS (if known) | Win | ||||
Webserver software & version (if known) | Apache/2.2.14 | ||||
PHP Version | 5.3.1 | ||||
Tom, I see the same problem with the second group (P2) in the second attached survey (limesurvey_survey_74213.lss). Again, no custom JS and straight-forward settings. |
|
The core problem with survey 57699 is that the question names is "arrayNumbersP1-1" - the question code should match this pattern /^[a-zA-Z][0-9a-zA-Z]*$/ If you look at the Survey Logic File for 57699, you will see lots of undefined variables. Survey 74213 has the same problem - it us using a minus sign in the question code/name. The logic file highlights these errors, and gives users the ability to easily fix them. So, this is not a bug per-say, but rather highlights a need for better documentation, and perhaps regex filters when people enter question codes to ensure that they are valid. |
|
Per the notes, this is not a bug in the code, but highlights a need for better documentation. |
|
But...what about poeple with existing surveys with these characters in question names? |
|
Recommendations? One option is to convert unacceptable characters within question codes to underscores. The other problem is that sometimes people re-use the same question code across groups. An option there might be to add a counter suffix to them to force them to be unique. This gets even trickier for cases like the sample survey where question codes ':', ';', and other single characters are used. All of them would just be converted to '_', so we'd have to do a second round of uniqueness checking. The question/group renumbering feature does work for people with such surveys. The question codes won't mean anything anymore, but the surveys will run. |
|
I'm afraid I don't have a solid recommendation but I am concerned about the compatability with existing surveys. |
|
There may be a relatively simple solution. The auto-generated code uses the qcode names. If I were to use the SGQA names instead, it should let the old surveys work. I'd still want to report that the qcodes are deprecated (not recommended), but may not need to show them as actual errors. I need to think about this some more. My main concern is that the generated JavaScript is currently nice and readable since it uses qcode values. If we change all equations to using SGQA, the JavaScript will be impossible to comprehend. The Show Logic File view should still be OK. Perhaps Carsten can weigh in on this. |
|
Assigning to Carsten just so he can weigh in. I'll implement the fix when we have a strategy. |
|
Fixed in revision 12194 |
|
1.92RC3 released |
|
LimeSurvey: Yii 61305566 2012-01-24 22:25:21 Details Diff |
Fixed issue 05683: Javascript errors with array-numbers question Dev Core problem was that EM internally uses qcode names on auto-generated equations. So, if the qcodes are invalid, things fail Dev Added option to use and generate legacy SGQA codes (this option is on by default) Dev Changed Show Logic File to not count poorly named qcodes as errors, but instead highlight them in pink so that users can optionally fix them Dev Added option to always show SGQA values (instead of qcodes). This is off by default. git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12195 b72ed6b6-b9f8-46b5-92b4-906544132732 |
Affected Issues 05683 |
|
mod - application/helpers/expressions/em_core_helper.php | Diff File | ||
mod - application/helpers/expressions/em_manager_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-01-23 16:06 | tpartner | New Issue | |
2012-01-23 16:06 | tpartner | Status | new => assigned |
2012-01-23 16:06 | tpartner | Assigned To | => TMSWhite |
2012-01-23 16:06 | tpartner | File Added: limesurvey_survey_57699.lss | |
2012-01-23 16:29 | tpartner | File Added: limesurvey_survey_74213.lss | |
2012-01-23 16:31 | tpartner | Note Added: 16911 | |
2012-01-23 16:52 | TMSWhite | Note Added: 16915 | |
2012-01-23 16:53 | TMSWhite | Note Added: 16916 | |
2012-01-23 16:53 | TMSWhite | Status | assigned => resolved |
2012-01-23 16:53 | TMSWhite | Resolution | open => no change required |
2012-01-23 17:11 | tpartner | Note Added: 16926 | |
2012-01-23 17:12 | tpartner | Status | resolved => feedback |
2012-01-23 17:12 | tpartner | Resolution | no change required => reopened |
2012-01-23 17:16 | TMSWhite | Note Added: 16927 | |
2012-01-23 17:41 | tpartner | Note Added: 16929 | |
2012-01-23 17:41 | tpartner | Status | feedback => assigned |
2012-01-23 18:14 | TMSWhite | Note Added: 16931 | |
2012-01-23 18:14 | TMSWhite | Assigned To | TMSWhite => c_schmitz |
2012-01-23 18:15 | TMSWhite | Note Added: 16932 | |
2012-01-25 07:24 | TMSWhite | Note Added: 16967 | |
2012-01-25 07:24 | TMSWhite | Status | assigned => resolved |
2012-01-25 07:24 | TMSWhite | Fixed in Version | => 1.92RC3 |
2012-01-25 07:24 | TMSWhite | Resolution | reopened => fixed |
2012-01-25 07:24 | TMSWhite | Assigned To | c_schmitz => TMSWhite |
2012-01-30 18:41 | c_schmitz | Note Added: 17064 | |
2012-01-30 18:41 | c_schmitz | Status | resolved => closed |
2012-03-14 21:08 | TMSWhite | Changeset attached | => Import 2012-03-09 13:30:34 Yii 61305566 |