[wp-trac] [WordPress Trac] #40866: Video widget does not successfully play several permutations of YouTube URLs

WordPress Trac noreply at wordpress.org
Fri May 26 21:04:29 UTC 2017


#40866: Video widget does not successfully play several permutations of YouTube
URLs
-------------------------------------------------+-------------------------
 Reporter:  jnylen0                              |       Owner:
     Type:  defect (bug)                         |  westonruter
 Priority:  normal                               |      Status:  assigned
Component:  Widgets                              |   Milestone:  4.8
 Severity:  normal                               |     Version:  trunk
 Keywords:  has-patch has-unit-tests commit      |  Resolution:
  dev-reviewed                                   |     Focuses:
-------------------------------------------------+-------------------------
Changes (by jnylen0):

 * keywords:  has-patch has-unit-tests commit dev-feedback => has-patch has-
     unit-tests commit dev-reviewed
 * owner:   => westonruter
 * status:  new => assigned


Comment:

 The patch fixes all the issues in the report, nice work!

 The "Failed to execute 'postMessage'" errors are still present, but this
 doesn't seem to be breaking anything.

 In [attachment:40866.4.diff]:

 - Fix the test suite - because of this lovely
 [https://github.com/WordPress/wordpress-develop/blob/4.7.5/src/wp-
 includes/media.php#L2430 static variable], [https://github.com/WordPress
 /wordpress-develop/blob/4.7.5/tests/phpunit/tests/media.php#L714 this
 test] has to be the first one that calls `wp_video_shortcode`.  In the
 other tests this is accomplished by depending on the first test, so I've
 done the same here.
 - Use `set_url_scheme` instead of a direct regex replace to set the URL
 scheme to `https`
 ([https://codex.wordpress.org/Function_Reference/set_url_scheme docs]).
 - Further comments tweaks.

 Annoyingly, when running `phpunit --filter Tests_Media` multiple times,
 there is still a test that fails unless you remove the media file it
 creates ([https://github.com/WordPress/wordpress-
 develop/blob/4.7.5/tests/phpunit/tests/media.php#L1932
 test_wp_get_attachment_image_should_use_wp_get_attachment_metadata]) - but
 this can be fixed separately.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40866#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list