Welcome, Guest
Username: Password: Remember me

TOPIC: problem with upload question

problem with upload question 6 months 1 week ago #106207

  • ricardo
  • ricardo's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 116
  • Thank you received: 1
  • Karma: 0
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
The administrator has disabled public write access.

problem with upload question 6 months 1 week ago #106224

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6334
  • Thank you received: 818
  • Karma: 243
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
The administrator has disabled public write access.

problem with upload question 6 months 1 week ago #106260

  • ricardo
  • ricardo's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 116
  • Thank you received: 1
  • Karma: 0
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
The administrator has disabled public write access.

problem with upload question 6 months 1 week ago #106278

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6334
  • Thank you received: 818
  • Karma: 243
What's is your PHP version ?
2.05 need PHP5.3 and up.

Denis
The administrator has disabled public write access.

problem with upload question 6 months 6 days ago #106368

  • ricardo
  • ricardo's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 116
  • Thank you received: 1
  • Karma: 0
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
The administrator has disabled public write access.

problem with upload question 6 months 6 days ago #106370

  • ricardo
  • ricardo's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 116
  • Thank you received: 1
  • Karma: 0
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
The administrator has disabled public write access.

problem with upload question 6 months 6 days ago #106371

  • ricardo
  • ricardo's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 116
  • Thank you received: 1
  • Karma: 0
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?
The administrator has disabled public write access.

problem with upload question 6 months 6 days ago #106381

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4195
  • Thank you received: 789
  • Karma: 359
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 6 months 6 days ago by tpartner.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.130 seconds
Donation Image