#27639 closed defect (bug) (fixed)
Install Themes: API call to api.wordpress.org fails under IE8/9 because of CORS
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.9 | Priority: | high |
Severity: | normal | Version: | 3.9 |
Component: | Themes | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
Currently the API call to fetch themes fails with the message "No transport".
After some searching I found, that $.support.cors = true;
should help. This still ends in an error with "Access is denied".
Attachments (3)
Change History (17)
This ticket was mentioned in IRC in #wordpress-dev by ocean90. View the logs.
11 years ago
#5
@
11 years ago
As indicated in #27581 we can also go the JSONP route. The API now supports the following:
- ?callback=
- tag: to be comma-separated rather than an array, to save on length
- fields: to be comma-separated rather than an array, to save on length (for this, it assumes all are
true
)
I'd suggest that everything be consolidated in apiCall; other areas shouldn't need to know tags should be imploded; it makes it harder to manipulate.
#6
@
11 years ago
- Keywords has-patch dev-feedback added; needs-patch removed
27639.patch is based on johnbillion's patch - added transient caching; tested in ie8, resolves the ticket issue;
#7
follow-up:
↓ 9
@
11 years ago
I don't think we need transient caching for this. We're dealing with a fairly arbitrary features matrix and arbitrary searching... It would explode the database without much benefit. It's unlikely to see much crossover with someone else's results; meanwhile, the JS maintains a local cache for that particular person.
I'd still like to see an attempt at JSONP and avoiding the proxy.
That said, if we were to proxy, then we should use themes_api() and bring in the filters we lost in WP_Theme_Install_List_Table::prepare_items().
#9
in reply to:
↑ 7
@
11 years ago
- Keywords needs-patch added; has-patch dev-feedback removed
Replying to nacin:
I don't think we need transient caching for this. We're dealing with a fairly arbitrary features matrix and arbitrary searching... It would explode the database without much benefit. It's unlikely to see much crossover with someone else's results; meanwhile, the JS maintains a local cache for that particular person.
I'd still like to see an attempt at JSONP and avoiding the proxy.
That said, if we were to proxy, then we should use themes_api() and bring in the filters we lost in WP_Theme_Install_List_Table::prepare_items().
Thanks for the feedback, good point about the transient caching. I will give the JSONP approach a shot.
#10
@
11 years ago
I missed this being opened and instead posted to the original THX ticket. My proposed solution is not very different from Adams. I've posted it here though for posterity.
#11
follow-up:
↓ 12
@
11 years ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In 27961:
Okay, if the browser doesn't support CORS, we can proxy these through PHP, as we had been doing before.