View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
06085Bug reportsOtherpublic2012-05-17 10:27
Reporteruser19571Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.92+ 
Fixed in Version1.92+ 
Summary06085: Internal errors when activating survey if Subquestion Code (title) has a trailing space.
Description

If a Multiple Choice SubQuestion has a Code with a trailing space, then the survey looks fine when previewed and tested, but when activated the following error appears:

Database error: Incorrect column name '69123X496X19472C '

id I NOTNULL AUTO PRIMARY,
submitdate T,
lastpage I,
startlanguage C(20) NOTNULL,
token C(36),
69123X496X19472SQ001 C(5),
69123X496X19472A C(5),
69123X496X19472B C(5),
69123X496X19472C C(5)

Steps To Reproduce

Import the attached test survey, which has a single question.
Try to activate it (the error occurs).

Here are steps to create such a survey:

  1. Add a question with type 'Multiple Choice'; Save
  2. Click "Edit Subquestions" icon, then Quick Add
  3. Enter 3 subquestions & click ADD
  4. In the subq. display, change the 'code' numbers to some strings, adding a trailing space to one of them. Click SAVE CHANGES.
TagsNo tags attached.
Attached Files
ErrorsWhenActivating.lss (20,703 bytes)
Bug heat6
Complete LimeSurvey version number (& build)120501
I will donate to the project if issue is resolvedNo
Browser
Database type & version155
Server OS (if known)Ubuntu 11.10 64-bit
Webserver software & version (if known)apache 2.2
PHP Versionphp5 5.3.6

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2012-05-11 12:06

developer   ~18696

And more,

With a space inside subQcode, answer are not saved :).

Thanks.

Denis

DenisChenu

DenisChenu

2012-05-11 12:18

developer   ~18697

But need to deactivate javascript to put some space inside code.

return goodchars(event,'1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ_')

c_schmitz

c_schmitz

2012-05-11 23:04

administrator   ~18720

Just don't deactivate JavaScript?

DenisChenu

DenisChenu

2012-05-12 11:10

developer   ~18721

Maybe importing and copy/paste can make problem.

But we can put some "before sending" javascript or some sanitize_paranoid_string in database.php or some filter just before activation.

Denis

user19571

2012-05-14 06:52

  ~18730

Actually, it would be great if subq titles could be arbitrary strings of any length. That way users could use useful mnemonics, and results exported to CSV files would have intelligible titles when exporting with just the codes.

Is there any functional reason subq titles have to be 5 characters or less?

c_schmitz

c_schmitz

2012-05-15 21:38

administrator   ~18772

Seems pasting is the issue.
jimavera: Subquestion titles are in certain questions types used as part of the fieldname

c_schmitz

c_schmitz

2012-05-15 23:59

administrator   ~18775

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

c_schmitz

c_schmitz

2012-05-15 23:59

administrator   ~18776

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

c_schmitz

c_schmitz

2012-05-17 10:27

administrator   ~18813

New 1.92+ version released.

Related Changesets

LimeSurvey: master f67c1157

2012-05-15 14:58:06

c_schmitz

Details Diff
Fixed issue 06085: By pasting a subquestion code can contain a space Affected Issues
06085
mod - admin/scripts/subquestions.js Diff File

LimeSurvey: Yii ab77d01f

2012-05-15 14:58:12

c_schmitz

Details Diff
Fixed issue 06085: By pasting a subquestion code can contain a space Affected Issues
06085
mod - application/views/admin/survey/Question/subQuestion_view.php Diff File
mod - scripts/admin/subquestions.js Diff File

Issue History

Date Modified Username Field Change
2012-05-11 02:54 user19571 New Issue
2012-05-11 02:54 user19571 File Added: ErrorsWhenActivating.lss
2012-05-11 12:06 DenisChenu Note Added: 18696
2012-05-11 12:18 DenisChenu Note Added: 18697
2012-05-11 22:47 c_schmitz Assigned To => c_schmitz
2012-05-11 22:47 c_schmitz Status new => assigned
2012-05-11 23:04 c_schmitz Note Added: 18720
2012-05-12 11:10 DenisChenu Note Added: 18721
2012-05-14 06:52 user19571 Note Added: 18730
2012-05-15 21:38 c_schmitz Note Added: 18772
2012-05-15 23:58 c_schmitz Status assigned => resolved
2012-05-15 23:58 c_schmitz Fixed in Version => 1.92+
2012-05-15 23:58 c_schmitz Resolution open => fixed
2012-05-15 23:59 c_schmitz Changeset attached => LimeSurvey master f67c1157
2012-05-15 23:59 c_schmitz Note Added: 18775
2012-05-15 23:59 c_schmitz Changeset attached => LimeSurvey Yii ab77d01f
2012-05-15 23:59 c_schmitz Note Added: 18776
2012-05-17 10:27 c_schmitz Note Added: 18813
2012-05-17 10:27 c_schmitz Status resolved => closed