MyBB Community Forums

Full Version: YouTube Is Not Coming Up In Post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can anyone help me figure out why I am unable to embed a YouTube video in the post?

You can see it in the post editor, but once I post it... I get the error.

View the short video in the link below.

View This

Let me know how to fix this.

Thanks!
Just at a quick look the page is missing the video id

if you look at the page the embed link is only showing

src="https://www.youtube.com/embed/"

it should be showing something like

src="//www.youtube.com/embed/D4SaofKCYwo"

so it is missing the video id for some reason??

Is it saving the correct details to the database?
1.9 had the same problem where youtube videos and other media sites worked on the editor but broke once submitting the post. Justin said it was the parser that was broke for 1.9 so maybe it could be the same issue for you. That would also explain fishntassies post.
(2019-10-20, 09:49 AM)iAndrew Wrote: [ -> ]1.9 had the same problem where youtube videos and other media sites worked on the editor but broke once submitting the post. Justin said it was the parser that was broke for 1.9 so maybe it could be the same issue for you. That would also explain fishntassies post.

So... you're referring to 1.9.xx, but what about 1.8.21?

Is there a workaround for this? This is a MUST HAVE for my new website.

(2019-10-20, 06:14 AM)fishntassie Wrote: [ -> ]Just at a quick look the page is missing the video id

if you look at the page the embed link is only showing

src="https://www.youtube.com/embed/"

it should be showing something like

src="//www.youtube.com/embed/D4SaofKCYwo"

so it is missing the video id for some reason??

Is it saving the correct details to the database?

Refer to iAndrew's post on this.

It would be nice to have a workaround for 1.8.21.
What's the link for the problematic post?
(2019-10-20, 11:33 AM)noyle Wrote: [ -> ]What's the link for the problematic post?

Come to my website and you'll see. Too many to list.

Pick one.
Is it doing it on the default theme by any chance.

it definitely does sound like it is an issue parsing the post i just tried it locally on multiple themes and it is working ok for me so i am guessing that something you have in your site is causing the problem.

If it is working in vanilla then you would need to find what change you have made is causing the parser to fail.

did i see somewhere else that you are using xthreads?

if the post details are correct in the database then you know the issue is the parser then you need to find where that is conflicting with what you have running on your site
(2019-10-20, 10:11 PM)fishntassie Wrote: [ -> ]Is it doing it on the default theme by any chance.

it definitely does sound like it is an issue parsing the post i just tried it locally on multiple themes and it is working ok for me so i am guessing that something you have in your site is causing the problem.

If it is working in vanilla then you would need to find what change you have made is causing the parser to fail.

did i see somewhere else that you are using xthreads?

if the post details are correct in the database then you know the issue is the parser then you need to find where that is conflicting with what you have running on your site

Yes, my website is using XThreads. 

I will re-install the MyBB default and see what happens with that.

I'll report back here with the results.

UPDATE:

The videos do show up in the MyBB default theme. 

So... at this point... I am not sure what to do. I can't use the MyBB default theme because the theme layout is out of whack with embedded media being in there.
Well if it works on the default theme, it's certainly a theme issue rather than a mybb issue. I would contact the guy who made the theme and inform him of the problem, or you could go through the core templates (headerinclude, footer, postbit, showthread, etc) and ensure the main mybb scripts are present.
As you determined it is working in the default or vanilla MyBB then next step is to start adding things back in such as xthreads testing it after each thing you add back in.

but as @Tactrus states comparing templates to ensure everything is being loaded also

Somewhere something is not loading the parser correctly or conflicting with it this may be due to something like xthreads so you need to eliminate everything until you find what is breaking it.