Opened 11 years ago

Closed 11 years ago

#7633 closed defect (fixed)

"dojo.io.iframe" bug uploading a file

Reported by: taras Owned by: James Burke
Priority: high Milestone: 1.3
Component: IO Version: 1.2beta
Keywords: Cc:
Blocked By: Blocking:

Description

Hi

Error: Request FAILED: [ Error: ifd.getElementsByTagName("textarea")[0] has no properties ] is displayed

See please standard test: dojo/tests/io/iframeUploadTest.html

thanks

Change History (8)

comment:1 Changed 11 years ago by dante

Priority: highestnormal
severity: blockernormal

is your response data wrapped in a <textarea></textarea> tag? That is the only reason for seeing this error, afaik.

comment:2 in reply to:  1 Changed 11 years ago by taras

Replying to dante:

is your response data wrapped in a <textarea></textarea> tag? That is the only reason for seeing this error, afaik.

Yes, my response is wrapped in a <textarea></textarea>, in the past months, this was required. Please, in case that this is an error, can you write me, how to do it?

thanks

Eduardo

comment:3 Changed 11 years ago by James Burke

Milestone: tbd1.2

Eduardo: the textarea thing is still required for text and json handleAs responses.

I believe the ticket is pointing out an issue with dojo/tests/io/iframeUploadTest.html. It uses upload.cgi in that same folder to handle the upload.

However, I just enabled the CGI file, but I get a python error when I hit it with the test. So something seems to be wrong with the .cgi file. I'll take a look at that.

If that is not the issue this ticket is reporting, please feel free to clarify.

comment:4 in reply to:  3 Changed 11 years ago by taras

Replying to jburke:

Eduardo: the textarea thing is still required for text and json handleAs responses.

I believe the ticket is pointing out an issue with dojo/tests/io/iframeUploadTest.html. It uses upload.cgi in that same folder to handle the upload.

However, I just enabled the CGI file, but I get a python error when I hit it with the test. So something seems to be wrong with the .cgi file. I'll take a look at that.

If that is not the issue this ticket is reporting, please feel free to clarify.

Thanks for your quick response, Dante.

I am using the iframe for json handleAs response, and receiving the same error than in the python code. My response is something like:

<textarea>{id:"1",text:"File Uploaded", color:"green",iconType:'"document"}</textarea>

But wat it seems to me strange, is that when I am writing a message (to a file) as the first line in a trivial php program, this line is not written. So it seems that the program is not being executed at all. Of course this trivial program has no syntax errors and is being executed correctly from other non 'iframe' Dojo methods

I cannot be sure, exactly when. But if I remember well, I tested this piece of code two weeks ago and still worked as always since I wrote the code, at least half year ago . For sure something changed, If it is intentional, and if the python test will be corrected accordingly, I will do the same in my php code or in the javascript.

thanks again, and good luck with your new job !

Eduardo

comment:5 in reply to:  3 Changed 11 years ago by taras

I think that it is possible to close this PR, guys.

It works.

thanks !

Eduardo

comment:6 Changed 11 years ago by James Burke

I still want to fix dojo/tests/io/upload.cgi. Not good to have a broken test, even though the actual dojo.io.iframe code is working.

One of the issues with upload.cgi is it tries to write to /tmp/upload. You need to at least change this to a path you can write to. I think I changed that correctly but I still get this error:

Traceback (most recent call last):

File "/Library/WebServer?/CGI-Executables/upload.cgi", line 60, in &lt;module>

""" % (string.join(dbg, "\n"))

ValueError?: unsupported format character ';' (0x3b) at index 91

Need more python fu to make further progress.

comment:7 Changed 11 years ago by bill

Milestone: 1.21.3

move 1.2 bugs to 1.3

comment:8 Changed 11 years ago by James Burke

Resolution: fixed
Status: newclosed

From [16782]: Fixes #7633, upload.cgi had a bad percent that was not escaped. Also turned off file saving by default to avoid common permission/directory missing errors.

Note: See TracTickets for help on using tickets.