Summary: | Drupal JS file uploads don't work | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Jakob Petsovits <jpetso> |
Component: | khtml | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | maksim |
Priority: | NOR | ||
Version: | 4.1.1 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
URL: | http://head.petsovits.at/node/1/edit | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Jakob Petsovits
2008-10-03 12:37:16 UTC
Many thanks for the report and the test site. Will take a look. (Though I need to dig out my patch for auto-reindenting sources first, since jQuery is the release version..) Actually, um, any chance you could replace /misc/jquery.js?4 with this version: http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6.js ...my debugger fanciness seems not to be fancy enough for something this compressed Thanks again for going to such length to help us fix this. Oops. Er, sure. I also replaced jquery.form.js with the unpacked version [1], just in case. (All .js files should be plaintext now.) Setting this stuff up is not so much work either, I'm doing Drupal development anyways :P Thanks to YOU for taking this stuff on and saving me from Firefox and other non-integrated browsers! [1] http://dev.jquery.com/browser/trunk/plugins/form/jquery.form.js?rev=3767 Thanks. Workaround: disabling popup blocking (!). The code seem to submit the form into a hidden iframe; (I think I had tried to debug something like this before). Investigating further. [Also seems to be possible to trigger a konqueror crash, which will be nice to fix, too] The following is a candidate fix, but needs further thought, since some of the code involved I am not familiar with. (P.S. With respect to the other Drupal report, from the description it's likely that the cause may be an another bug the fix for which I have pending, so I'll look at that after that fix is finalized, in hope of not having to do any additional work) maksim@treetop:~/kde4/src/kdelibs/khtml$ svn diff ecma/kjs_html.cpp Index: ecma/kjs_html.cpp =================================================================== --- ecma/kjs_html.cpp (revision 865420) +++ ecma/kjs_html.cpp (working copy) @@ -2106,8 +2106,9 @@ if ( view && view->part() ) { if (!view->part()->url().host().isEmpty()) caption = view->part()->url().host() + " - "; - // search all (possibly nested) framesets - KHTMLPart *currentPart = view->part()->parentPart(); + // search all (possibly nested) framesets. We have to start from here + // since the frame can be an iframe of ours, too. + KHTMLPart *currentPart = view->part(); while( currentPart != 0L ) { if( currentPart->frameExists( form.target().string() ) ) block = false; SVN commit 875819 by orlovich: Fix how we find existing frames for the purpose of form target= submission. This fixes file upload for drupal 6/jquery.form --- its submit was incorrectly blocked as a popup attempt As we refactored this method, also use it for window.open, fixing us blocking opens to _self along the way. While testing this, I noticed that we can crash konq if we do window.open and one of the frames doesn't yet have a part yet. Added a workaround suggested by dfaure for now, as the proper fix is too risky and should be done on unstable branch only. BUG:172073 BUG:102044 M +15 -22 ecma/kjs_html.cpp M +21 -2 ecma/kjs_window.cpp M +2 -0 ecma/kjs_window.h M +3 -2 khtml_part.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=875819 Thanks a lot! That was like my favorite KHTML bug (apart from the more recent derstandard.at crash), I just love to see it working. Also, now that both of my reported Drupal problems are fixed, I've taken down the test site again as it's an easy target for crackers, running an unreleased development version and stuff. If you need a Drupal test site again, you know where to ask :) |