Closed Bug 71834 Opened 24 years ago Closed 24 years ago

enctype form submission not working (submit button does nothing, breaks bugzilla file submission)

Categories

(Core :: DOM: Core & HTML, defect, P1)

defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: doronr, Assigned: pollmann)

Details

(Keywords: smoketest)

Attachments

(4 files)

it's impossible to attach a file to bugzilla, the submit button is not working. I'll try to testcase this.
Attached file testcase
added testcase
What build are you using? My windows 98 2001-03-12-04-Mtest works fine.
i'm using a self-built linux build from today. hwaara said he sees it in win32 as well, which is why I filed. I will try to get a few more people to test this
to clarify: if a ENCTYPE is set, the submit button does nothing.
Summary: file attachment not working in bugzilla → enctype form submission not working (submit button does nothing, breaks bugzilla file submission)
duplicate of #71346?
Probably not a dup; bug 71346 was marked fixed yesterday, but today's build can't submit (in fact, this bug was filed today). This one might be caused by the same event blockers that are causing lots of other problems (bug 71224, bug 71836), or is it possible that it was caused by the fix to 71346? BTW, I'm seeing it in today's release build.
Keywords: smoketest
on bug 71346 it says that it seems to try to connect to the server, while here the button does nothing at all, no network activity.
At first glance the fix to the other blockers does not seem to have fixed this. I'll take a closer look.
In a test case with two forms, one with enctype and one without, both submit buttons fire click events and both forms fire submit events. But as noted in the other comments, the enctype form has no network activity.
Well I'm seeing nsFormFrame::OnSubmit get called in both cases. Either the test case is working and seeming to do nothing for me since it doesn't actually have a URL to submit to or its broken somewhere inside of nsFormFrame::OnSubmit. Can someone with the fixes for the other event related blockers today from /mozilla/content take a look and see which it is?
in ns4.76 linux, the testcase i attached loads a bugzilla page (but with an error, as the bugid is missing).
So, if NS4.7 is having the same behavior... could this be a server problem?
eric better take a look
Assignee: rods → pollmann
The failure occurs here - we are trying to open a stream for reading that is already open for writing. The stream in question is the temp file that we wrote the form upload data to: nsFileSpecImpl::OpenStreamForReading(nsFileSpecImpl * const 0x05ae5530) line 446 nsFileSpecImpl::GetInputStream(nsFileSpecImpl * const 0x05ae5530, nsIInputStream * * 0x0012ec90) line 495 + 15 bytes nsFormFrame::OnSubmit(nsFormFrame * const 0x01372dec, nsIPresContext * 0x047690a0, nsIFrame * 0x01372e44) line 927 + 19 bytes nsFormControlHelper::DoManualSubmitOrReset(nsIPresContext * 0x047690a0, nsIPresShell * 0x04774920, nsIFrame * 0x01372da0, nsIFrame * 0x01372e44, int 1, int 0) line 1010 nsHTMLButtonControlFrame::MouseClicked(nsIPresContext * 0x047690a0) line 345 + 29 bytes nsHTMLInputElement::HandleDOMEvent(nsHTMLInputElement * const 0x050e3910, nsIPresContext * 0x047690a0, nsEvent * 0x0012f3f8, nsIDOMEvent * * 0x00000000, unsigned int 1, nsEventStatus * 0x0012f778) line 1308
Status: NEW → ASSIGNED
This was broken by: mozilla/ xpcom/ io/ nsFileStream.cpp 1.34 naving%netscape.com Mar 12 14:46 #69862, r=bienvenu sr=scc. Close the stream in the destructor. Because: //---------------------------------------------------------------------------------------- NS_IMETHODIMP nsFileSpecImpl::Write(const char * data, PRInt32 requestedCount, PRInt32 *_retval) //---------------------------------------------------------------------------------------- { TEST_OUT_PTR(_retval) //if (!mOutputStream) // return NS_ERROR_NULL_POINTER; if (!mOutputStream) { nsresult rv = OpenStreamForWriting(); if (NS_FAILED(rv)) return rv; } nsOutputFileStream s(mOutputStream); *_retval = s.write(data, requestedCount); return s.error(); } When the temp local variable s goes out of scope, the destructor is called, and the file is closed - all further writes to this file will fail. I'll back out the change to remove the blocker (since it doesn't apparently directly fix any critical bugs and is not 0.8.1 anyhow). CC'ing naving
Priority: -- → P1
Hardware: PC → All
Checked in. To verify, upload an attachment to this bug report. :)
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
note that blizzard filed 71962 about form submission not fully uploading
Eric, Is another fix possible rather than backing out my checkins. #69862 fixes a couple of mail bugs #68875 and #66795
Probably, but file upload form submission is not the only thing that uses nsFileSpec. Other users: PICS Wallet Silent Download Editor PSM Glue Browser Persist Plugins Netlib Preferences Profile Manager XPInstall HTML Parser Any of these users that use the FileSpec handle to write more than one time to a file will also be broken. My guess is that you will either need to fix the FileSpec Write implementation along with your fix for bug 69862, or replace all of these users with nsIFile and the other modern file apis.
When I click Submit on Build 2001-03-29-04 On windows 98 the status bar shows resolving host bugzilla.mozilla.org... and nothing happens. Reopening
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Looking at this...
Status: REOPENED → ASSIGNED
This works in my 032822 Win NT debug build, and the checkins between 10PM and 4AM yesterday look pretty innocent. Have you been able to reproduce this on any platform besides Win98? Could it be a DNS problem?
Doron's testcase works fine here on linux opt cvs tip build from the tree closure today.
I just pulled a commercial optimized Win NT build from this morning 032909, and it works fine. Marking this WORKSFORME unless someone can confirm that this bug is reproducible...
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → WORKSFORME
I've attached a file on linux without problems, but on windows 98 build 2001-03-29-04-Mtrunk I cannot submit... it times out
verifying
Status: RESOLVED → VERIFIED
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: