View Issue Details

This bug affects 1 person(s).
 20
IDProjectCategoryView StatusLast Update
04965Bug reportsSurvey takingpublic2011-05-15 12:27
Reporterobiweasel Assigned Totexens  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.91RC4 
Target Version1.91RC5 
Summary04965: Error upload file type.
Description

There is an error while uploading a file, using the upload file type.

Everything is good, until clicking "Save and Exit". Then you get JS error below. Screen looks good, but there is no way to continue once this error has occurred. You can not even close window to continue, your stuck.

Steps To Reproduce

Create any survey with upload file type:

Additional Information

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
Timestamp: Sat, 19 Feb 2011 14:48:37 UTC

Message: 'document.getElementById(...).contentDocument.defaultView' is null or not an object
Line: 104
Char: 25
Code: 0
URI: http://www.mymallweasel.com/survey/scripts/modaldialog.js

TagsNo tags attached.
Bug heat20
Complete LimeSurvey version number (& build)9797
I will donate to the project if issue is resolvedNo
BrowserIE 8
Database type & versionMySQL 5.0.1.77
Server OS (if known)Linux
Webserver software & version (if known)APACHE
PHP Version5.2.9

Relationships

has duplicate 05108 closedtexens uploading file question type modal dialog window won't close in IE8 
has duplicate 05021 closedtexens File upload 'Save and exit' or 'x' hangs in Internet Explorer 

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2011-03-08 14:57

administrator   ~14335

What's the status on this? Didn't you resolve it already? If yes, please set to resolved.

texens

texens

2011-04-12 14:59

reporter   ~14799

obiweasel,

Can you please verify if this problem persists with 1.91 RC6?

Thanks,

user13073

2011-04-13 09:18

  ~14808

problem persists in 1.91RC6.

fcabralpacheco

fcabralpacheco

2011-05-04 15:00

reporter   ~14917

Texens,

Still exists with 1.91 RC6

I had the same problem.
This occurs because "document.getElementById('uploader').contentDocument.defaultView" is not defined in IE8 and "document.getElementById('uploader').contentDocument" is not defined in IE6.

I solved this by replacing:

var pass = document.getElementById('uploader').contentDocument.defaultView.saveAndExit(fieldname, show_title, show_comment, pos);

by:

var pass;
if(document.getElementById('uploader').contentDocument)
{
if(document.getElementById('uploader').contentDocument.defaultView)
{
/Firefox/
pass=document.getElementById('uploader').contentDocument.defaultView.saveAndExit(fieldname,show_title,show_comment,pos);
}else{
/IE8/
pass=document.getElementById('uploader').contentWindow.saveAndExit(fieldname,show_title,show_comment,pos);
}
}else{
/IE6/
pass=document.getElementById('uploader').contentWindow.saveAndExit(fieldname,show_title,show_comment,pos);
}

texens

texens

2011-05-05 03:42

reporter   ~14924

Issue fixed in r10032.

fcabralpacheco,
Thanks a tonne for the patch :)

user13073

2011-05-05 05:12

  ~14927

Looks good,
but why not simply replace all "document.getElementById('uploader').contentDocument.defaultView.saveAndExit" with "document.getElementById('uploader').contentWindow.saveAndExit"?
It works in both IE8 and Firefox I tested, probably no need for the if/else ;?)

fcabralpacheco

fcabralpacheco

2011-05-05 14:46

reporter   ~14932

yong,

Good idea,
In the recent versions works.
But, I have an application that interacts with the content in an iframe, and in the past had problems with "document.getElementById('*').contentWindow" in older versions of Firefox.

Issue History

Date Modified Username Field Change
2011-02-19 15:51 obiweasel New Issue
2011-02-23 17:07 Mazi Assigned To => texens
2011-02-23 17:07 Mazi Status new => assigned
2011-02-23 17:07 Mazi Target Version => 1.91RC5
2011-03-08 14:57 c_schmitz Note Added: 14335
2011-04-12 14:59 texens Note Added: 14799
2011-04-12 14:59 texens Status assigned => feedback
2011-04-12 15:24 c_schmitz Relationship added related to 05063
2011-04-12 15:25 c_schmitz Relationship deleted related to 05063
2011-04-12 15:25 c_schmitz Relationship added has duplicate 05018
2011-04-12 15:25 c_schmitz Relationship added has duplicate 05108
2011-04-12 15:25 c_schmitz Relationship deleted has duplicate 05018
2011-04-13 09:18 user13073 Note Added: 14808
2011-05-04 15:00 fcabralpacheco Note Added: 14917
2011-05-05 03:42 texens Note Added: 14924
2011-05-05 03:42 texens Status feedback => resolved
2011-05-05 03:42 texens Resolution open => fixed
2011-05-05 05:12 user13073 Note Added: 14927
2011-05-05 05:18 c_schmitz Relationship added has duplicate 05021
2011-05-05 14:46 fcabralpacheco Note Added: 14932
2011-05-15 12:27 c_schmitz Status resolved => closed