Fixed New YouTube URLs don't parse for embedding. The specified URL cannot be embedded as media.

Digital Doctor

Well-known member
YouTube has changed their URLs recently.
This URL
Code:
http://www.youtube.com/watch?feature=player_embedded&v=T8fsvYd2RBY
results in an error:
The specified URL cannot be embedded as media.
Removing the text: feature=player_embedded&
from the URL results in an embeddable video.
results in an embedable video.
Code:
http://www.youtube.com/watch?[B][/B]v=T8fsvYd2RBY
I got this URL from http://googleblog.blogspot.com/ (posted Oct 13, 2011).
 

Digital Doctor

Well-known member
Just add a new Match URL to the YouTube media BB Code.
Code:
youtube.com/watch?feature=player_embedded&v={$id}
Excellent point !

I'm not sure this can be classed as a bug.
Admins and Mods are going to be annoyed with questions regarding this issue from their users.
The URLs just changed. Expect more and more reports of this !
 

Brogan

XenForo moderator
Staff member
Not much can be done when it is third party sites/software which change, other than for site administrators to try and keep up.
 

Brogan

XenForo moderator
Staff member
I certainly don't want my existing media BB Code settings being overwritten during an upgrade, so it would only be "fixed" for new installations.
 
F

Floris

Guest
So every time jquery, google maps, whatismyip, twitter, facebook, addthis, youtube, vimeo, etc updates. We can assume that XenForo won't be updated to reflect these changes?

That's just pathetic. Plain and simple. Sorry if that's rude.
Auto embedding of youtube is a core feature, any customization on top of it is just like customizing templates.
 

Brogan

XenForo moderator
Staff member
The match URLs are stored in xf_bb_code_media_site:match_urls

How does an upgrade take account of what's already in that field and merge it with any new or changed entries, which may or may not already be there, or may have been changed from the defaults?

It's no different to the smilies changing to sprites in 1.1; any existing installations weren't affected but new installations use the sprite method.
 
Fixed. No attitude required.

Er, how is it fixed? I tried embedding a YouTube video using the "Media" in the forum, and got the exact same message, "The specified URL cannot be embedded as Media".

Is there something I need to do additionally so that my members can embed YouTube videos, or others, for that matter?

I copy/pasted the entire link, than just tried with the YouTube ID for that vid, and got the same message both times.

Once I copy/pasted Brogan's fix, "youtube.com/watch?feature=player_embedded&v={$id}"
and than added the YouTube ID between the { } the video did indeed embed, though I had to erase everything before the bracket so that nothing but the video showed up in the post. The end result was "[media =youtube]ID[/media]". Why does it not turn up like that from just c/ping the link, instead of having to do what I described previously?
 
Top