#18952 closed defect (bug) (fixed)
AJAX calls to IDN don't work in IE and Opera
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | I18N | Version: | 3.2.1 |
| Severity: | normal | Keywords: | has-patch dev-feedback |
| 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)
comment:1
SergeyBiryukov
— 20 months ago
SergeyBiryukov
— 20 months ago
comment:2
SergeyBiryukov
— 20 months 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.
SergeyBiryukov
— 20 months ago
SergeyBiryukov
— 20 months ago
comment:3
SergeyBiryukov
— 20 months ago
- Keywords has-patch added
18952.patch and 18952.2.patch are two different attempts to use a relative admin URL for AJAX requests.
comment:4
SergeyBiryukov
— 19 months ago
Related: ticket:10690:18.
comment:5
SergeyBiryukov
— 18 months ago
- Milestone changed from Awaiting Review to 3.4
comment:6
SergeyBiryukov
— 17 months ago
Well, relative_admin_url() from 18952.patch obviously doesn't need $scheme parameter.
comment:7
SergeyBiryukov
— 17 months ago
- Component changed from External Libraries to I18N
- Keywords dev-feedback added
comment:8
follow-up:
↓ 9
nacin
— 17 months ago
Perhaps this should be wp_ajax_url() instead of a wrapper, as we probably wouldn't use it elsewhere.
SergeyBiryukov
— 17 months ago
comment:9
in reply to:
↑ 8
SergeyBiryukov
— 17 months 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.
comment:10
follow-up:
↓ 11
ryan
— 17 months 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.
SergeyBiryukov
— 17 months ago
SergeyBiryukov
— 17 months ago
comment:11
in reply to:
↑ 10
SergeyBiryukov
— 17 months 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.
comment:12
nacin
— 17 months ago
In [19870]:
comment:13
nacin
— 17 months ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In [19871]:
comment:14
nacin
— 15 months ago
In [20188]:
comment:15
nacin
— 15 months ago
In [20191]:
Attached a workaround plugin.