problem with upload question

More
3 years 5 months ago #106207 by ricardo01
ricardo01 created the topic: problem with upload question
Every time participants attach a file they cannot go back to the survey and must exit and return, with the document not attached.

Using version 2.05+ Build 140116 Tried to update but ComfortUpdate fails at step 4. Reported bug 3 days ago.

Help with this issued is much appreciated...and needed

Please Log in to join the conversation.

More
3 years 5 months ago #106224 by DenisChenu
DenisChenu replied the topic: problem with upload question
Hi,

Maybe there are some scories(file leave here, but not needed) after confortupdate.Then : try manual update (replace your file with 'official' file) and did the user clean their browser cache ?

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 5 months ago #106260 by ricardo01
ricardo01 replied the topic: problem with upload question
Hi Denis,

Thanks for the reply...I haven't been able to do comfort update becasue the process always fails at step 4. I've got some serious surveys going on, and I'm hestitant to do a manual update.
I'll wait till I hear if the comfortUpdate problem is a bug or it's just me who's having problems with this.

cheers

Please Log in to join the conversation.

More
3 years 5 months ago #106278 by DenisChenu
DenisChenu replied the topic: problem with upload question
What's is your PHP version ?
2.05 need PHP5.3 and up.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 5 months ago #106368 by ricardo01
ricardo01 replied the topic: problem with upload question
PHP 5.3.25 I updated the installation, but the upload question persists. There's no button to go back to the survey after uploading a document

Please Log in to join the conversation.

More
3 years 5 months ago #106370 by ricardo01
ricardo01 replied the topic: problem with upload question
I created a test survey with only one group and a file-upload question...and the good news is that the question is working fine. I was able to upload a file and go back to the survey.

This means that something in the survey is creating the error. I'm now going group by group, question by question to find out what causes the file upload to crash.

I'm attaching the lls file, in case somebody would like to take a look too.

Thanks

File Attachment:

File Name: llpApplication.lss
File Size:121 KB
Attachments:

Please Log in to join the conversation.

More
3 years 5 months ago #106371 by ricardo01
ricardo01 replied the topic: problem with upload question
One of my questions in the group where the file upload question is, has a javascript code. I deleted the function and the upload question is now working fine. This function had been working fine...what could've changed?

<script type="text/javascript" charset="utf-8">
$(document).ready(function(){

// Identify the questions
var q1ID = '{QID}';
var q1 = $('#question'+q1ID+'');
var q2 = $(q1).nextAll('.array-multi-flexi-text:eq(0)');
var q2ID = $(q2).attr('id').split('question')[1];

// Initial row handling
handleRows($('input[type="text"]', q1));

// Listener on the numeric input
$('input[type="text"]', q1).change(function(){
var maxRows = $('tr:[id^="javatbd"]', q2).length;
if($(this).val() > maxRows) {
alert('You can only display a maximum of '+maxRows+' rows!');
$(this).val('');
}
else {
handleRows(this);
}
});

function handleRows(el) {
var numRows = $(el).val();
$('tr:[id^="javatbd"]', q2).hide();
$('tr:[id^="javatbd"]', q2).each(function(i){
if(i >= numRows) {
$('input[type="text"], select', this).val('');
}
else {
$(this).show();
}
})
}
});
</script>How many courses, focused on or related to entrepreneurship, are you teaching this year?

Please Log in to join the conversation.

More
3 years 5 months ago - 3 years 5 months ago #106381 by tpartner
tpartner replied the topic: problem with upload question
There are syntax errors that the new version of jQuery will not tolerate.

You need to change all instances of this:
$('tr:[id^="javatbd"]', q2)
To this:
$('tr[id^="javatbd"]', q2)


<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function(){
 
		// Identify the questions
		var q1ID = '{QID}';
		var q1 = $('#question'+q1ID+'');
		var q2 = $(q1).nextAll('.array-multi-flexi-text:eq(0)');
		var q2ID = $(q2).attr('id').split('question')[1];
 
		// Initial row handling
		handleRows($('input[type="text"]', q1));
 
		// Listener on the numeric input
		$('input[type="text"]', q1).change(function(){
			var maxRows = $('tr[id^="javatbd"]', q2).length;
			if($(this).val() > maxRows) {
				alert('You can only display a maximum of '+maxRows+' rows!');
				$(this).val('');
			}
			else {
				handleRows(this);
			}
		});
 
		function handleRows(el) {
			var numRows = $(el).val();
			$('tr[id^="javatbd"]', q2).hide();
			$('tr[id^="javatbd"]', q2).each(function(i){
				if(i >= numRows) {
					$('input[type="text"], select', this).val('');
				}
				else {
					$(this).show();
				}
			})
		}
	});
</script>

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 3 years 5 months ago by tpartner.

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now