Opened 12 years ago
Closed 11 years ago
#24124 closed defect (bug) (worksforme)
YouTube embed fails silently
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.5.1 |
Component: | Embeds | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
I have never been able to get the YouTube embed to work by [embed] or just quoting the URL. I tried finding out why today, and tracing through what the code does, I find it times out trying to fetch JSON for the oEmbed data via php-cURL from YouTube. (In fact I think it is the DNS lookup that is particularly slow here, but I don't think it makes much difference where the cause is, and it seems to fail not just on the server I'm developing on, but also on other servers). It consistently takes about 7 seconds for YouTube to reply on the system I'm testing on, and I see the timeout is 5 seconds. Now I know what the problem is I have added a filter to increase the timeout.
The biggest problem though is that it fails quietly. There is no error message on saving a post. Secondly, it behaves randomly and marginally - sometimes it works, sometimes it doesn't, depending on the load at YouTube presumably.
I think the author should at least be told their post has failed and why. However, if the timeout is consistently too low, there is then no way to make it work, without changing PHP code in a much more knowledgeable way than a typical user.
Ideally, you'd then offer the opportunity to repost with a larger timeout. If this were available, then the post could be refused publication until it works.
Just increasing the default timeout globally isn't a good solution, as saves will appear to hang, and I don't really know what side effects that might have elsewhere.
Change History (3)
#3
@
11 years ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
It consistently takes about 7 seconds for YouTube to reply on the system I'm testing on
Seems like a local issue for me and can't reproduce this. Also no feedback in the last six months.
Can you walk through the steps you take to reproduce this issue and what version of WP you're using?
Thanks!