#18952 closed defect (bug) (fixed)
AJAX calls to IDN don't work in IE and Opera
Reported by: | SergeyBiryukov | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | 3.2.1 |
Component: | I18N | Keywords: | has-patch dev-feedback |
Focuses: | Cc: |
Description
In jQuery 1.5+, AJAX requests on sites with IDN domains don't work in IE 8 or 9.
On Edit Post screen, adding a new category results in JS error:
Message: 'parsed.responses' - is null or not an object Line: 311 Char: 4 Code: 0 URI: http://домен.рф/wp-admin/js/post.dev.js?ver=20110524
On Categories screen, adding a new category silently fails.
According to jaubourg's comment in jQuery bug tracker, the request is considered cross-domain and, since IE doesn't support cross-domain requests, AJAX won't find a suitable transport and bail out. The ticket only refers to IE 8, but I've checked this in IE 9, and it seems to show the same behaviour.
A workaround suggested there is to use unencoded domain name or strip it completely.
Attachments (6)
Change History (21)
#2
@
13 years ago
- Summary changed from AJAX calls to IDN don't work in IE to AJAX calls to IDN don't work in IE and Opera
Opera 11.51 is also affected.
#3
@
13 years ago
- Keywords has-patch added
18952.patch and 18952.2.patch are two different attempts to use a relative admin URL for AJAX requests.
#4
@
13 years ago
Related: ticket:10690:18.
#6
@
13 years ago
Well, relative_admin_url()
from 18952.patch obviously doesn't need $scheme
parameter.
#8
follow-up:
↓ 9
@
13 years ago
Perhaps this should be wp_ajax_url() instead of a wrapper, as we probably wouldn't use it elsewhere.
#9
in reply to:
↑ 8
@
13 years ago
Replying to nacin:
Perhaps this should be wp_ajax_url() instead of a wrapper, as we probably wouldn't use it elsewhere.
Thanks, done in 18952.3.patch.
#10
follow-up:
↓ 11
@
13 years ago
I was thinking all of the url functions that accept a scheme argument could accept relative and root_relative, or the like. No new function needed unless we want a convenience wrapper or filters with more specific context.
#11
in reply to:
↑ 10
@
13 years ago
Replying to ryan:
I was thinking all of the url functions that accept a scheme argument could accept relative and root_relative, or the like.
Makes sense, done in 18952.4.patch. 18952.5.patch also updates PHPDocs.
Attached a workaround plugin.