View Issue Details

IDProjectCategoryView StatusLast Update
16194Bug reportsSurvey takingpublic2020-08-24 11:40
Reporterashvini Assigned Togabrieljenik  
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
Product Version4.2.x 
Summary16194: file upload disables other clicks
DescriptionIF we do file upload then after that dependency does not work at all

Attachedd sample lss please refer it

Also made changes in uploader.js

Before changes
window.getUploadHandler = function(qid, options){
if (!window.currentUploadHandler){
window.currentUploadHandler = new uploadHandler(qid, options);
}
window.currentUploadHandler.init();
return window.currentUploadHandler;
}
---------------------------------------------------------------------------
After changes

window.getUploadHandler = function(qid, options){
if (!window.currentUploadHandler){

}
window.currentUploadHandler = new uploadHandler(qid, options);
window.currentUploadHandler.init();
return window.currentUploadHandler;
}
Steps To Reproduce1. clicking on first question of YES/NO qid1 -->it works fine
2. Second question opens up, on clicking yes of qid1 (This question is file upload --> works perfect as expected)
3.again we have YES/NO question-> qid3
4. fourth question will open on YES of qid 3 --> (Does not work) -->(This is also a file upload question)


if opening second and fourth question on page load by clicking YES of qid1 and qid3 respectively -> then do upload, it works as expected

But again remaining questions (if dependency is there) , it does not show dependent question on clicking yes of parent question.
Additional InformationRefer link

https://www.limesurvey.org/community/forums/development/120958-2-file-upload-in-a-single-page#198001

TagsNo tags attached.
Complete LimeSurvey version number (& build)version 4.2.0
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionMySql
Server OS (if known)
Webserver software & version (if known)
PHP Version5.7

Relationships

related to 16589 closedgabrieljenik Unable to Upload files using File upload (|) . 
related to 16549 closedgabrieljenik Error message is shown while trying to delete and reupload file using File upload 

Activities

ashvini

ashvini

2020-04-27 14:35

reporter  

DenisChenu

DenisChenu

2020-04-27 15:01

developer   ~57393

Last edited: 2020-04-27 15:01

View 2 revisions

Confirm the issue (not the fix) on git version

Please : can you create a survey with only 2 Y/N questions and 2 upload questions : more simple to understand.
ollehar

ollehar

2020-04-27 17:46

administrator   ~57397

Last edited: 2020-08-05 16:31

Blocking issue?
ashvini

ashvini

2020-04-28 07:25

reporter   ~57406

Last edited: 2020-08-05 16:31

Sure...
 Created 4 question whereas 4th question will be visible on 3rd question (Yes)

As I started executing survey,
1. First question is file upload --> I did upload of image
2. Second question is also file upload (Works Fine)
3. As I clicked on YES (4th question is not getting displayed)

But then did submit,
then error popup shown for 4th question and 4th question was displayed
ashvini

ashvini

2020-04-28 07:33

reporter   ~57407

Last edited: 2020-08-05 16:31

My undertsnading is file upload is simply blocking other js, which we used for dependent question visibility.... Please look into this issue... And thank you so much for quick reply.


No error in console also
DenisChenu

DenisChenu

2020-04-28 08:45

developer   ~57408

Last edited: 2020-08-05 16:31

Ok,

1. 2nd hidden question didn't need to be a upload question
2. Expression manager work for html update
3. Condition work before open upload dialog
4. condition didn't work after open upload dialog

See screencast …
Peek 28-04-2020 08-45.gif (852,235 bytes)
DenisChenu

DenisChenu

2020-04-28 08:46

developer   ~57409

Last edited: 2020-08-05 16:31

ashvini

ashvini

2020-04-29 14:31

reporter   ~57463

Last edited: 2020-08-05 16:31

Thank you @DenisChenu.....

I was trying to explain same....
Please help me in same as i have 3 file upload question and these are individually dependent on YES/NO questions
I hope you understood scenario....

Kindly help me to find some solution for same.... Thank you so much
DenisChenu

DenisChenu

2020-04-29 14:34

developer   ~57464

Last edited: 2020-08-05 16:31

> I was trying to explain same....

In fact : i understand right :) but i think it's more clear with only one upload question type.

PS : even if you fix work, i think we need to better understand the reason of this bug :)
ollehar

ollehar

2020-04-29 14:38

administrator   ~57465

Last edited: 2020-08-05 16:31

Tip: Restore code to LS3.
DenisChenu

DenisChenu

2020-04-29 14:48

developer   ~57466

Last edited: 2020-08-05 16:31

Compare code ? No ?

Its what i do for 2 upload question :)
ashvini

ashvini

2020-04-30 11:53

reporter   ~57490

Last edited: 2020-08-05 16:31

@ollehar and @DenisChenu

I will be grateful, if any solution i can get for this.
I have tried from my side but as no error in console... I am unable to debug
ashvini

ashvini

2020-05-06 11:53

reporter   ~57573

Last edited: 2020-08-05 16:31

I have added custom jquery to handle hide show in custom.js

Issue has been handled
Thank you
DenisChenu

DenisChenu

2020-05-06 11:58

developer   ~57574

Last edited: 2020-08-05 16:31

> I have added custom jquery to handle hide show in custom.js

Please : if yu, have clean solution and/or explanation : can you help ?

Remind : LimeSurvey CE are made by a community …
ashvini

ashvini

2020-05-06 14:39

reporter   ~57583

Last edited: 2020-08-05 16:31

Ok
I don't think this is a clean solution..
But we can add js functionality in extended theme js file
I did same.
Actully added jquery to handle click on yes/no button

eg.
$("#answer552942X34X3063Y").on('click',function(){ $("#question11610").removeClass("ls-irrelevant ls-hidden"); })
$("#answer552942X34X3063N").on('click',function(){ $("#question11610").addClass("ls-irrelevant ls-hidden"); })

In this, answer552942X34X3063Y is (ID of yes radio button)
answer552942X34X3063N (ID of No radio button)
question11610 (QuestionID which will be shown or hide on YES OR NO)
DenisChenu

DenisChenu

2020-05-11 13:24

developer   ~57680

Last edited: 2020-08-05 16:31

@JHoeck : it's not the admin filemanager, it's the fileupload controller here https://github.com/LimeSurvey/LimeSurvey/blob/master/application/controllers/UploaderController.php

Public uploader :)
cdorin

cdorin

2020-06-22 21:47

manager   ~58384

Last edited: 2020-08-05 16:31

Hello,
Does the issue still exist? I remember some file upload fixes pushed some time ago.
cdorin

cdorin

2020-08-05 14:08

manager   ~59323

Last edited: 2020-08-05 16:31

No feedback provided - ticket closed.
DenisChenu

DenisChenu

2020-08-05 15:17

developer   ~59324

Last edited: 2020-08-05 16:31

Still an issue in current master and limesurvey_survey_uploadBrokeCondition.lss

Screencast
DenisChenu

DenisChenu

2020-08-05 15:17

developer   ~59325

Last edited: 2020-08-05 16:31

Peek 05-08-2020 15-17.gif (420,891 bytes)
cdorin

cdorin

2020-08-05 16:30

manager   ~59328

Last edited: 2020-08-05 16:31

Thanks for video, Denis. I will assign it to @gabrieljenik
gabrieljenik

gabrieljenik

2020-08-17 14:39

manager   ~59480

https://github.com/LimeSurvey/LimeSurvey/pull/1552

After loading the upload frame inside the modal, 'relevance:on' event handlers are lost.
Calling triggerEmRelevance() when closing the modal fixes the issue.

Contains also fix for 16549: Error message is shown while trying to delete and reupload file using File upload

user225042

2020-08-18 15:23

  ~59502

Tested issue by checking to branch, I am not able to upload file for 2nd question in the file imported
Please refer screenshot for more details
gabrieljenik

gabrieljenik

2020-08-18 21:05

manager   ~59514

@sushmanadendla, can you please retry now?
This patch should cover 16194, 16549 and 16589.

user225042

2020-08-19 12:18

  ~59518

Last edited: 2020-08-19 12:27

View 2 revisions

@gabrieljenik i tried reproducing but still issue exist, I have cleared cache and tried.
Please refer the recording for more details
https://screencast-o-matic.com/watch/cYjq66GWOR
gabrieljenik

gabrieljenik

2020-08-19 17:14

manager   ~59525

Applying same fix as in 16415, now for LSv4
Reverting a change, mimicing a rollback done in chromium

Making the scripts url relative to the installation path, in case the installation is under a subfolder

user225042

2020-08-19 17:56

  ~59527

Tested below scenario's:
1. Added png, gif, doc, odt, jpg, pdf files was able to add successfully-WORKING AS EXPECTED
2. Tested adding file extension (xml),(lss),(html) got a message saying "Sorry, this file extension (html) is not allowed!"-WORKING AS EXPECTED
3. Tested adding and deleting the file-WORKING AS EXPECTED
4. Tested re-uploading the file-WORKING AS EXPECTED
5. When I try adding .txt file i am getting the same error but not sure how it should behave.
6. When I try to do a file upload after the above error i continuously get the error message- FAILED

Please refer the screenshot for more details
image.png (88,618 bytes)   
image.png (88,618 bytes)   

user225042

2020-08-20 15:46

  ~59557

Able to do the file upload successfully. Please refer the attachment for more details
gabrieljenik

gabrieljenik

2020-08-21 11:44

manager   ~59569

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

lime_release_bot

2020-08-24 11:40

administrator   ~59585

Fixed in Release 4.3.13+200824

Related Changesets

LimeSurvey: master 09da6655

2020-08-17 14:37:41

gabrieljenik

Details Diff
Fixed issue 16194: file upload disables other clicks.

After loading the upload frame inside the modal, 'relevance:on' event handlers are lost.
Calling triggerEmRelevance() when closing the modal fixes the issue.

Contains also fix for 16549: Error message is shown while trying to delete and reupload file using File upload
Affected Issues
16194, 16549
mod - assets/packages/questions/upload/build/uploadquestion.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js.map Diff File
mod - assets/packages/questions/upload/src/ajaxupload.js Diff File

LimeSurvey: master be5f29fc

2020-08-18 18:58:13

gabrieljenik

Details Diff
Revert "Fixed issue 16194: file upload disables other clicks."

This reverts commit 09da665557ea5e4b094ff4c4eabb9d821a14b878.
Affected Issues
16194
mod - assets/packages/questions/upload/build/uploadquestion.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js.map Diff File
mod - assets/packages/questions/upload/src/ajaxupload.js Diff File

LimeSurvey: master e3229069

2020-08-18 19:00:29

gabrieljenik

Details Diff
Fixed issue 16194: file upload disables other clicks.

After loading the upload frame inside the modal, 'relevance:on' event handlers are lost.
Calling triggerEmRelevance() when closing the modal fixes the issue.

Removes the cache for the currentUploadHandler. This wasn't working for multiple upload question in the same as it was caching it on a window level variable. Removed the cache for simplifiying.

Contains also fix for 16549: Error message is shown while trying to delete and reupload file using File upload
Affected Issues
16194, 16549
mod - assets/packages/questions/upload/build/uploadquestion.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js.map Diff File
mod - assets/packages/questions/upload/src/ajaxupload.js Diff File
mod - assets/packages/questions/upload/src/modaldialog.js Diff File
mod - assets/packages/questions/upload/src/uploader.js Diff File

LimeSurvey: master dd0e3673

2020-08-18 20:57:51

gabrieljenik

Details Diff
Revert "Fixed issue 16194: file upload disables other clicks."

This reverts commit e3229069839435b28de88cfcd994be9873d64e78.
Affected Issues
16194
mod - assets/packages/questions/upload/build/uploadquestion.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js.map Diff File
mod - assets/packages/questions/upload/src/ajaxupload.js Diff File
mod - assets/packages/questions/upload/src/modaldialog.js Diff File
mod - assets/packages/questions/upload/src/uploader.js Diff File

LimeSurvey: master e5155535

2020-08-18 20:59:00

gabrieljenik

Details Diff
Fixed issue 16194: file upload disables other clicks.

After loading the upload frame inside the modal, 'relevance:on' event handlers are lost.

Removed the jquery package as it was overstepping all the bindings previously done.

Removes the cache for the currentUploadHandler. This wasn't working for multiple upload question in the same as it was caching it on a window level variable. Removed the cache for simplifiying.

Contains also fix for 16549: Error message is shown while trying to delete and reupload file using File upload
Affected Issues
16194, 16549
mod - application/controllers/UploaderController.php Diff File
mod - assets/packages/questions/upload/build/uploadquestion.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js.map Diff File
mod - assets/packages/questions/upload/src/ajaxupload.js Diff File
mod - assets/packages/questions/upload/src/uploader.js Diff File

LimeSurvey: master 38437afb

2020-08-19 17:03:14

gabrieljenik

Details Diff
Fixed issue 16194: file upload disables other clicks.

Applying same fix as in 16415, now for LSv4
Reverting a change, mimicing a rollback done in chromium
Affected Issues
16194
mod - application/controllers/UploaderController.php Diff File
mod - assets/packages/questions/upload/build/uploadquestion.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js.map Diff File
mod - assets/packages/questions/upload/src/ajaxupload.js Diff File

LimeSurvey: master b238d266

2020-08-19 17:08:37

gabrieljenik

Details Diff
Fixed issue 16194: file upload disables other clicks.

Making the scripts url relative to the installation path, in case the installation is under a subfolder
Affected Issues
16194
mod - application/config/config-defaults.php Diff File
mod - application/controllers/UploaderController.php Diff File

LimeSurvey: master 4195433d

2020-08-21 00:21:15

gabrieljenik

Details Diff
Fixed issue 16194: file upload disables other clicks.

Code Review
Affected Issues
16194
mod - application/controllers/UploaderController.php Diff File

LimeSurvey: master 8697d482

2020-08-21 11:44:42

ollehar1


Committer: GitHub Details Diff
Fixed issue 16194: File upload disables other clicks. Affected Issues
16194
mod - application/config/config-defaults.php Diff File
mod - application/controllers/UploaderController.php Diff File
mod - assets/packages/questions/upload/build/uploadquestion.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js Diff File
mod - assets/packages/questions/upload/build/uploadquestion.min.js.map Diff File
mod - assets/packages/questions/upload/src/ajaxupload.js Diff File
mod - assets/packages/questions/upload/src/uploader.js Diff File

Issue History

Date Modified Username Field Change
2020-04-27 14:35 ashvini New Issue
2020-04-27 14:35 ashvini File Added: limesurvey_survey_552942 (1).lss
2020-04-27 15:01 DenisChenu Note Added: 57393
2020-04-27 15:01 DenisChenu Note Edited: 57393 View Revisions
2020-04-27 17:46 ollehar Note Added: 57397
2020-04-28 07:25 ashvini Note Added: 57406
2020-04-28 07:25 ashvini File Added: limesurvey_survey_928938.lss
2020-04-28 07:33 ashvini Note Added: 57407
2020-04-28 08:45 DenisChenu Note Added: 57408
2020-04-28 08:45 DenisChenu File Added: Peek 28-04-2020 08-45.gif
2020-04-28 08:46 DenisChenu Note Added: 57409
2020-04-28 08:46 DenisChenu File Added: limesurvey_survey_uploadBrokeCondition.lss
2020-04-28 10:04 ollehar Priority none => urgent
2020-04-28 10:04 ollehar Severity partial_block => crash
2020-04-28 10:04 ollehar Description Updated View Revisions
2020-04-28 10:04 ollehar Steps to Reproduce Updated View Revisions
2020-04-28 10:04 ollehar Additional Information Updated View Revisions
2020-04-29 14:31 ashvini Note Added: 57463
2020-04-29 14:34 DenisChenu Note Added: 57464
2020-04-29 14:38 ollehar Note Added: 57465
2020-04-29 14:48 DenisChenu Note Added: 57466
2020-04-30 11:53 ashvini Note Added: 57490
2020-05-06 11:53 ashvini Note Added: 57573
2020-05-06 11:58 DenisChenu Note Added: 57574
2020-05-06 14:39 ashvini Note Added: 57583
2020-05-11 12:13 JHoeck Category Survey taking => File manager
2020-05-11 13:24 DenisChenu Note Added: 57680
2020-06-15 14:02 ollehar Category File manager => Survey taking
2020-06-22 21:47 cdorin Note Added: 58384
2020-06-22 21:47 cdorin Priority urgent => none
2020-06-22 21:47 cdorin Status new => feedback
2020-08-05 14:08 cdorin Status feedback => closed
2020-08-05 14:08 cdorin Resolution open => no change required
2020-08-05 14:08 cdorin Note Added: 59323
2020-08-05 15:17 DenisChenu Status closed => new
2020-08-05 15:17 DenisChenu Resolution no change required => reopened
2020-08-05 15:17 DenisChenu Note Added: 59324
2020-08-05 15:17 DenisChenu Note Added: 59325
2020-08-05 15:17 DenisChenu File Added: Peek 05-08-2020 15-17.gif
2020-08-05 16:30 cdorin Note Added: 59328
2020-08-05 16:31 cdorin Assigned To => gabrieljenik
2020-08-05 16:31 cdorin Priority none => normal
2020-08-05 16:31 cdorin Status new => confirmed
2020-08-05 16:31 cdorin Zoho Sprints => |Yes|
2020-08-05 16:31 swendrich Zoho Sprints ID => 14469000000206025
2020-08-17 14:39 gabrieljenik Note Added: 59480
2020-08-18 15:23 user225042 Note Added: 59502
2020-08-18 15:23 user225042 File Added: 16194_Fileupload_Disablesotherclicks.png
2020-08-18 21:05 gabrieljenik Note Added: 59514
2020-08-19 12:18 user225042 Note Added: 59518
2020-08-19 12:27 user225042 Note Edited: 59518 View Revisions
2020-08-19 17:14 gabrieljenik Note Added: 59525
2020-08-19 17:14 gabrieljenik Relationship added related to 16589
2020-08-19 17:14 gabrieljenik Relationship added related to 16549
2020-08-19 17:56 user225042 Note Added: 59527
2020-08-19 17:56 user225042 File Added: image.png
2020-08-20 15:46 user225042 Note Added: 59557
2020-08-20 15:46 user225042 File Added: FileUpload_otherclicks.png
2020-08-21 11:44 ollehar1 Changeset attached => LimeSurvey master 8697d482
2020-08-21 11:44 gabrieljenik Changeset attached => LimeSurvey master 4195433d
2020-08-21 11:44 gabrieljenik Changeset attached => LimeSurvey master b238d266
2020-08-21 11:44 gabrieljenik Changeset attached => LimeSurvey master 38437afb
2020-08-21 11:44 gabrieljenik Changeset attached => LimeSurvey master e5155535
2020-08-21 11:44 gabrieljenik Changeset attached => LimeSurvey master dd0e3673
2020-08-21 11:44 gabrieljenik Changeset attached => LimeSurvey master e3229069
2020-08-21 11:44 gabrieljenik Changeset attached => LimeSurvey master be5f29fc
2020-08-21 11:44 gabrieljenik Changeset attached => LimeSurvey master 09da6655
2020-08-21 11:44 gabrieljenik Note Added: 59569
2020-08-21 11:44 gabrieljenik Resolution reopened => fixed
2020-08-24 11:40 lime_release_bot Zoho Sprints Yes => |Yes|
2020-08-24 11:40 lime_release_bot Note Added: 59585
2020-08-24 11:40 lime_release_bot Status confirmed => closed