[wp-trac] [WordPress Trac] #40808: Media Widgets: VideoPress Uploads Not Functioning Correctly

WordPress Trac noreply at wordpress.org
Thu May 18 21:51:08 UTC 2017


#40808: Media Widgets: VideoPress Uploads Not Functioning Correctly
----------------------------+-----------------------------------------
 Reporter:  timmydcrawford  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  4.8
Component:  Widgets         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:  javascript, administration
----------------------------+-----------------------------------------

Comment (by timmydcrawford):

 > This would just mean the error message would be shown asynchronously
 after the response returns, but I think that is fine.

 I agree seems okay to me as well.

 So back to the original issue here - I have tracked down the current
 failure point in the flow of the OP, as to why the widget is rendering the
 attachment URL.  In the video widget's {{{render_media}}}, we are calling
 the base class method {{{is_attachment_with_mime_type}}}
 https://core.trac.wordpress.org/browser/trunk/src/wp-includes/widgets
 /class-wp-widget-media-video.php#L112 which subsequently calls
 {{{wp_attachment_is}}} on the attachment and the mime type.  That function
 returns false because there is no attached file for the VideoPress
 attachment post.

 Back in the {{{render_media}}} logic - no {{{$attachment}}} is set, so
 {{{wp_get_attachment_url}}} is not called and the original attachment url
 returned from the media modal is used in the video shortcode, and the
 above screenshot is the result.

 Solutions?  Perhaps the VideoPress plugin can extend the media widget JS
 to ensure the proper oembed url is set based upon the
 {{{videopress_guid}}} returned from the WordPress.com API - this would
 likely also fix the {{{render_preview}}} issue as the oembed/proxy
 response would return a proper thumbnail_url for the video as well.

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


More information about the wp-trac mailing list