[wp-trac] [WordPress Trac] #24124: YouTube embed fails silently

WordPress Trac noreply at wordpress.org
Thu Apr 18 14:43:50 UTC 2013


#24124: YouTube embed fails silently
------------------------------+--------------------------
 Reporter:  frankieandshadow  |       Type:  defect (bug)
   Status:  new               |   Priority:  normal
Milestone:  Awaiting Review   |  Component:  Embeds
  Version:  3.5.1             |   Severity:  normal
 Keywords:                    |
------------------------------+--------------------------
 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24124>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list