- Posts: 12
- Thank you received: 3
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Error 400 appears randomly when i upload a file
- Limuss
- Topic Author
- Offline
- New Member
Less
More
4 years 10 months ago - 4 years 10 months ago #185091
by Limuss
Error 400 appears randomly when i upload a file was created by Limuss
Hello Everyone:
Sometimes when i test a survey using a upload file answer, appears (not always) a
400 error "Bad Request" "The request could not be understood by the server due to malformed syntax. Please do not repeat the request without modifications."
I try to find, the cause of the problem, but when i see additional information in a developer console appears this error:
Microsoft Edge throws error: modaldialog.js (31,21) SCRIPT438: Object doesn't support property or method 'saveAndExit'
I put the code of a function openUpladModalDialog() modaldialog.js from here:
I use Limesurvey version 3.17.3+190429
Any advice will be well accepted.
Thanks for advance,
Sometimes when i test a survey using a upload file answer, appears (not always) a
400 error "Bad Request" "The request could not be understood by the server due to malformed syntax. Please do not repeat the request without modifications."
I try to find, the cause of the problem, but when i see additional information in a developer console appears this error:
Microsoft Edge throws error: modaldialog.js (31,21) SCRIPT438: Object doesn't support property or method 'saveAndExit'
I put the code of a function openUpladModalDialog() modaldialog.js from here:
Code:
function openUploadModalDialog(){ $('.upload').click(function(e) { e.preventDefault(); var $this = $(this); var show_title = getQueryVariable('show_title', this.href); var show_comment = getQueryVariable('show_comment', this.href); var pos = getQueryVariable('pos', this.href); var fieldname = getQueryVariable('fieldname', this.href); var buttonsOpts = {}; buttonsOpts[uploadLang.returnTxt] = function() { $(this).dialog("close"); }; $('#file-upload-modal-' + fieldname).appendTo('body').modal(); $(document).on('shown.bs.modal','#file-upload-modal-' + fieldname, function() { updateMaxHeightModalbody($(this)); }); $('#file-upload-modal-' + fieldname).on('hide.bs.modal', function() { var pass; var uploaderId = 'uploader' + fieldname; if(document.getElementById(uploaderId).contentDocument) { if(document.getElementById(uploaderId).contentDocument.defaultView) { /*Firefox*/ pass=document.getElementById(uploaderId).contentDocument.defaultView.saveAndExit(fieldname,show_title,show_comment,pos); }else{ /*IE8*/ pass=document.getElementById(uploaderId).contentWindow.saveAndExit(fieldname,show_title,show_comment,pos); } }else{ /*IE6*/ pass=document.getElementById(uploaderId).contentWindow.saveAndExit(fieldname,show_title,show_comment,pos); } return pass; }); }); }
I use Limesurvey version 3.17.3+190429
Any advice will be well accepted.
Thanks for advance,
Attachments:
Last edit: 4 years 10 months ago by Limuss. Reason: add information
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13637
- Thank you received: 2491
4 years 10 months ago #185116
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Error 400 appears randomly when i upload a file
Seems to be an issue : please report.Limuss wrote: I use Limesurvey version 3.17.3+190429
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: Limuss
The topic has been locked.
- Limuss
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 3
4 years 10 months ago - 4 years 10 months ago #185138
by Limuss
Replied by Limuss on topic Error 400 appears randomly when i upload a file
Last edit: 4 years 10 months ago by Limuss.
The following user(s) said Thank You: DenisChenu
The topic has been locked.