View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
06187Bug reportsSurvey takingpublic2012-06-20 14:08
ReporterDenisChenu Assigned ToTMSWhite  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.92+ 
Fixed in Version1.92+ 
Summary06187: Javascript Error on em_javascript.js : attr is undefined
Description

When use a upload file type, there are a Javascript error in em_javascript.js
attr is undefined

Steps To Reproduce

Add a file upload question type, test the question/group/survey and click on "upload files"

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)120609
I will donate to the project if issue is resolvedNo
BrowserFF 12
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Relationships

related to 06154 closedTMSWhite File upload questions not mandatory anymore 

Users monitoring this issue

There are no users monitoring this issue.

Activities

TMSWhite

TMSWhite

2012-06-11 13:14

reporter   ~19151

I haven't seen this in my test surveys. Please upload a sample survey showing this behavior.

DenisChenu

DenisChenu

2012-06-11 14:44

developer   ~19154

It's for whol upload files
See : http://ls-dev.sondages.pro/Yii/index.php/survey/index/sid/827645/newtest/Y/lang/fr
When you click on "Envoyer des fichiers" .

Not a langage issue:
In english:
http://ls-dev.sondages.pro/Yii/index.php/survey/index/sid/698391/newtest/Y/lang/en

Denis

TMSWhite

TMSWhite

2012-06-11 15:38

reporter   ~19158

Core problem is LEMval('0') tries to access variable called '0' instead of returning the number 0.

TMSWhite

TMSWhite

2012-06-11 15:44

reporter   ~19160

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

TMSWhite

TMSWhite

2012-06-11 15:44

reporter   ~19161

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

TMSWhite

TMSWhite

2012-06-11 15:46

reporter   ~19162

survey 16115 also shows the problem, when setting min or max number of files.

DenisChenu

DenisChenu

2012-06-11 16:07

developer   ~19163

Sh...t it's a langage issue ....

Thank's ;)

TMSWhite

TMSWhite

2012-06-11 16:20

reporter   ~19164

Denis-

Looks like you're missing the max_num_of_files value for the file upload. The default is supposed to be 1. If it is blank, the file uploader won't work (you get a URL with maxfiles=&... - so a missing parameter on the URL string.

I don't see any reference in the documentation under advanced_question_attributes for max_num_of_files or min_num_of_files, so I can't tell if users expect a different behavior if max_num_of_files is blank.

TMSWhite

TMSWhite

2012-06-11 16:25

reporter   ~19165

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

TMSWhite

TMSWhite

2012-06-11 16:25

reporter   ~19166

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

TMSWhite

TMSWhite

2012-06-11 16:27

reporter   ~19167

Denis-

This next set of commits should make it work for you, even with the missing max_num_of_files attribute.

/Tom

DenisChenu

DenisChenu

2012-06-11 16:51

developer   ~19168

Hello Tom,

Look at max_num_of_files, think if max_num_of_files are set to "" on adminpart, then max_num_of_files are to be set at default.

$qattributes["max_num_of_files"] default is 1.

I work on "don't save default value", look at this part after.

c_schmitz

c_schmitz

2012-06-20 14:08

administrator   ~19402

New 1.92+ version released.

Related Changesets

LimeSurvey: master 4d54fafc

2012-06-11 06:39:50

TMSWhite

Details Diff
Fixed issue 06187: Javascript Error on em_javascript.js : attr is undefined
Dev Had to ensure that LEMval(x) returns x if x is a number (and not a reference to a variable)
Affected Issues
06187
mod - scripts/em_javascript.js Diff File

LimeSurvey: Yii 10e1c188

2012-06-11 06:43:42

TMSWhite

Details Diff
Fixed issue 06187: Javascript Error on em_javascript.js : attr is undefined
Dev Had to ensure that LEMval(x) returns x if x is a number (and not a reference to a variable)
Affected Issues
06187
mod - scripts/expressions/em_javascript.js Diff File

LimeSurvey: master b8dfacef

2012-06-11 07:23:57

TMSWhite

Details Diff
Fixed issue 06187: Javascript Error on em_javascript.js : attr is undefined
Dev Gracefully handle LEMval('')
Affected Issues
06187
mod - scripts/em_javascript.js Diff File

LimeSurvey: Yii 55d33c64

2012-06-11 07:24:47

TMSWhite

Details Diff
Fixed issue 06187: Javascript Error on em_javascript.js : attr is undefined
Dev Gracefully handle LEMval('')
Affected Issues
06187
mod - scripts/expressions/em_javascript.js Diff File

LimeSurvey: Yii 5799c508

2012-06-13 17:25:25

DenisChenu

Details Diff
Fixed issue : Save empty string for value
Dev : empty string remove the attribute
Dev : see bug 06187 comment #c19168
Affected Issues
06187
mod - application/controllers/admin/database.php Diff File

Issue History

Date Modified Username Field Change
2012-06-09 14:47 DenisChenu New Issue
2012-06-09 14:47 DenisChenu Relationship added related to 06154
2012-06-11 10:06 Mazi Assigned To => TMSWhite
2012-06-11 10:06 Mazi Status new => assigned
2012-06-11 13:14 TMSWhite Note Added: 19151
2012-06-11 14:38 DenisChenu File Added: limesurvey_survey_upload.lss
2012-06-11 14:44 DenisChenu Note Added: 19154
2012-06-11 15:38 TMSWhite Note Added: 19158
2012-06-11 15:38 TMSWhite Product Version 2.00RC2 => 1.92+
2012-06-11 15:44 TMSWhite Changeset attached => LimeSurvey Yii 10e1c188
2012-06-11 15:44 TMSWhite Note Added: 19160
2012-06-11 15:44 TMSWhite Resolution open => fixed
2012-06-11 15:44 TMSWhite Changeset attached => LimeSurvey master 4d54fafc
2012-06-11 15:44 TMSWhite Note Added: 19161
2012-06-11 15:45 TMSWhite File Added: limesurvey_survey_16115.lss
2012-06-11 15:46 TMSWhite Note Added: 19162
2012-06-11 15:46 TMSWhite Status assigned => resolved
2012-06-11 15:46 TMSWhite Fixed in Version => 1.92+
2012-06-11 16:07 DenisChenu Note Added: 19163
2012-06-11 16:20 TMSWhite Note Added: 19164
2012-06-11 16:25 TMSWhite Changeset attached => LimeSurvey master b8dfacef
2012-06-11 16:25 TMSWhite Note Added: 19165
2012-06-11 16:25 TMSWhite Changeset attached => LimeSurvey Yii 55d33c64
2012-06-11 16:25 TMSWhite Note Added: 19166
2012-06-11 16:27 TMSWhite Note Added: 19167
2012-06-11 16:51 DenisChenu Note Added: 19168
2012-06-15 08:50 DenisChenu Changeset attached => LimeSurvey Yii 5799c508
2012-06-20 14:08 c_schmitz Note Added: 19402
2012-06-20 14:08 c_schmitz Status resolved => closed