Closed (fixed)
Project:
Drupal core
Version:
4.7.0-beta1
Component:
update system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2005 at 15:57 UTC
Updated:
2 Jan 2006 at 14:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
xand commentedConfirming this - Update.php does not work in opera 8.51.
Note that the update.php script does also work in firefox 1.5
Comment #2
junyor commentedSame problem with Opera 9.0P1.
Comment #3
xand commentedI can also confirm that this problem was introduced by the new update.php - Drupal 4.6.0 update.php works perfectly on Opera 8.51.
Comment #4
junyor commentedComment #5
drummThis is an issue for UnConeD to look at. He wrote most of the JS.
I think the solution is to turn off Drupal's JS for Opera. It should automatically fall back to the method involving meta-refreshes.
Comment #6
Steven commentedSeems Opera does not perform XMLHttpRequest POST when the data is undefined or null. Patch attached, tested on Opera 8.51.
Comment #7
Steven commentedOh and I also included a slight code fix for update.php to remove a foreach warning.
Comment #8
drummLooks good to me.
Comment #9
junyor commentedSteven and Drumm: Thanks for looking into this. I'll see about getting Opera fixed.
Works with Opera now. Tested with Opera 9.0P1+.
Comment #10
junyor commentedFiled as Opera bug 190245. The WHATWG WebApps 1.0 spec. does not define what should happen if send() is null or undefined[1]. I've contacted the spec. author for clarification.
[1] http://www.whatwg.org/specs/web-apps/current-work/#scripted-http
Comment #11
dries commentedWhat does it mean when an object is undefined or null? Sorry, I'm not too familiar with the spec. Can't we ensure that object is always properly defined, rather than putting a browser hack in? I'm OK with this patch but I wanted to double-check.
Comment #12
junyor commentedDries: It's not that the variable is undefined, per se, but that there's no data sent when the script reaches the send() function. I'm not sure why that happens, though.
Comment #13
Thox commentedPOST doesn't seem to be a requirement in this case, and changing it to a GET works just fine (tested in FF and Opera 8.01). Attached a patch.
Note: I avoided touching progress.js, but if an empty HTTPPost won't work then perhaps it's best to enforce a GET request to find the progress?
Comment #14
dries commentedCommitted to HEAD. Thanks.
Comment #15
Steven commentedThis patch was completely bogus, because the JS codepath was broken. The 'has js' form field no longer has an ID, which means it can not be found anymore. Furthermore, update.php explicitly checks for 'POST', so it would not have worked.
Can we test this stuff properly next time?
Comment #16
Steven commentedHere's a patch:
I can't immediately give a clear reason why POST rather than GET is used for the Ajax progress monitoring/updating request, but Neil did add this explicitly, so there must be a good reason. There is even a check so that GET requests don't work at all. I'm guessing it helps to avoid caching-issues on the Apache or proxy/client side (not Drupal caching). Using POST also makes more sense because each requests performs new updates rather than just fetching status passively.
Patch tested on Safari, Firefox and Opera (all on OS X). I can't test IE because my wintel box blew up, but it is unlikely that this change would affect it.
*: You could argue that the Ajax codepath is unnecessary because the meta-refresh version works equally well. But, especially when updating a remote server, the UI in the meta-refresh version will flicker because it reloads every time. The Ajax version only adjusts the progressbar display so it is a lot nicer.
Comment #17
drummUpdating changes data, so it should be POST.
Technical requirements (meta-refresh sucking) require the non-JS version to use GET. POST isn't technically required, but is the more correct way to do things when possible.
Comment #18
Thox commentedNo need to send a blank string, the problem is more obscure than that - we should offer the HTTP method in lowercase apparently.
This minor tweak lets me POST blank data in Opera 8.01.
Comment #19
junyor commentedI'm pretty sure a lower case 'post' won't work at all in Opera 8.01. That was one of the bugs fixed in Opera 8.02.
Comment #20
junyor commentedSteven: I'd prefer if you said it's a work-around for Opera 8. We'll have this fixed in Opera 9.
Comment #21
Wesley Tanaka commentedI just ran into something that fits this description on firefox (1.0.6 linux) while updating to 4.7.0-test2
Comment #22
junyor commentedSteven's latest patch is working here again.
Comment #23
dries commentedPatch doesn't apply.
Comment #24
junyor commentedRerolled patch. It looks like the problem was a conflicting CVS ID in drupal.js.
Comment #25
dries commentedCommitted to HEAD. Thanks.
Comment #26
(not verified) commented