I can't find any piece of code using this.progress.update_callback
and this.progress.error_callback
on this line: ajax.js
My google-fu and ctrl-F fu is not strong enough.
The way this thing works is that a PHP settings gives the name of a JS function that is used as callback. It's wrong, that's not how you use javascript and If this needs to be supported and there is actual code using it, I'd be happy to do it properly (this could use some jquery ui to make it work).
Here is a patch that gets rid of it, it uses eval()
and gets in the way of #1417378: Remove eval() from tableHeader JavaScript and #1415788: Javascript winter clean-up.
Comment | File | Size | Author |
---|---|---|---|
#7 | core-js-remove-ajax-dead-code-1420022-7.patch | 698 bytes | nod_ |
core-js-remove-ajax-dead-code.patch | 1.45 KB | nod_ | |
Comments
Comment #1
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedThere was a commit not long ago that fixed the uploadprogress bar: #935208: PECL uploadprogress bar doesn't appear.. Maybe it made the code you mention obsolete.
Comment #2
nod_I'm not sure, but it's definitely related.
I can still use the progressbar for my file upload. It's the closest I've been to related code, that's already a win, thanks.
Comment #3
nod_I need a review because I can't find anything more about this. For me this has to go.
Comment #4
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedThe default error message for machine_name fields would be: The machine-readable name must contain only lowercase letters, numbers, and underscores..(Mhh ... wrong issue.)Comment #5
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedFixing method names in issue title.
With this patch
admin/reports/updates/check
stops working. If you search forupdateCallback
anderrorCallback
in core/misc/batch.js you'll find that it looks like it's beeing used there. But I am not sure enough to mark this won't fix.Comment #6
nod_Oh yeah I ended up breaking that indeed.
What I want to remove is the eval part, I don't want to take out the methods you're talking about because it could be used, that's a valid thing to have.
Comment #7
nod_Comment #8
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedLooks good. Throbbers and progress bars in core are still working.
Comment #9
sunLooks good to me.
We discussed in IRC, even asked @merlinofchaos and others whether anyone uses this dynamic callback, and apparently no one even knew that this even existed. The code dates back to ahah.js.
That said, it's still an API change, so we should at least write a small change notice.
Comment #10
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks all!
Comment #11
xjmLooks like this commit didn't actually make it in. Also still needs that change notification that sun suggests.
Comment #12
xjmAlright, the commit is there now, so change notification time.
Comment #13
gddhttp://drupal.org/node/1451282
Comment #14
sunThanks @heyrocker!
Comment #15
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedComment #17
xjmComment #17.0
xjmadd jquery ui comment