YouTube Problem
#1
This is only happening at FreeVPS.  The same YouTube videos are working perfectly elsewhere.  YouTube videos at FreeVPS are showing black with a snow cast instead of an image.  And when I click on the arrow in the box it comes up with this message:

Quote:An error occurred - please try again later.


I've been trying since yesterday.  Smile I've also tried both FireFox and Chrome. Both respond the same.

Here's a thread with YouTube Videos for testing:
https://freevps.us/thread-22027-post-244...#pid244402
#2
I feel there is a problem with youtube mycode here, there is an extra http:// within the mycode. So you can just remove the http:// or https:// part from video url and post it within the code like
Code:
[video=youtube]youtube.com/watch?v=DWEIMPHz7S0[/video]
.
Below is an example with your link.


Show support by wearing an Avatar or Signature or Custom Rank if you think freevps.us should not be closed.
Code:
[IMG]http://i65.tinypic.com/15z1afs.jpg[/IMG]
#SaveFreeVPS for the future
#3
That's not great. This is not a nice MyBB update. The code to embed videos has changed during one of the last updates. Now you have to omit the protocol when embedding Youtube videos like @LittleMaster mentioned.
#4
Thanks very much @LittleMaster for fixing this.  So it's not only the https: that has to be removed but also the www. before youtube.  Think what would have made much greater sense for me would have been for myBB to make the myBB Youtube tags shorter and to only include the code after v=, as in:


Code:
[video=youtube]DWEIMPHz7S0[/video]

But that would have been too uncomplicated for myBB.  Tounge

@Monad Agreed this is not great.  Particularly since all of the older YouTube videos in the Forum are now basically deprecated.  What's so amazing is that I haven't been able to find any myBB notification during my searches with Google.  I'd have expected some announcement would have come up with a link to the myBB Community Forum.  Could be my search key words were not good.  Anyway, am glad this has been solved.  Many thanks.
#5
They probably should support both instead of reject it if it doesn't work for MyBB. It doesn't make any sense and breaks links...
Thank you HostUS for VPS 16!

Check out @coreyman's Free VPS Club for a free VPS with only 15 posts/month!
No waiting required to get a free VPS, just make posts and apply!
#6
Apparently this is an issue with MyBB 1.8.15 - see Github issue #3066. The pull request to fix this has been merged and will be included in 1.8.16 according to the milestone on the Github issue.



Original post



Input



Code:
[video=youtube]https://www.youtube.com/watch?v=z5VUti3kVIo[/video]

Output







If you inspect element, the url in `src` attribute of the iframe is malformed

Code:
<iframe width="560" height="315" src="//www.youtube.com/embed/z5VUti3kVIo&quot; target" frameborder="0" allowfullscreen=""></iframe>

i.e. the url is `//www.youtube.com/embed/z5VUti3kVIo&quot; target`. What the Eggplant?
#7
Great find (I missed it - probably wrong search key words or who knows, not many have updated their myBB Forums yet) and many thanks for letting us know @thirthy_speed. So looks as though there will be a fix with the next update and possibly common sense added to it - like an option to make all previous YouTube links work with their original links.
#8
So I was right after all. Until some recent updates it has been always working. In conclusion this means that another MyBB update was released that broke the most simple things. Hmm... This is probably the reason why the HTML5 Video Embedding MyCode is broken (the code in HTML inspect looks exactly broken as in the example of @thirthy_speed when using the full URL).

Let's hope they will really fix it soon.
#9
The solution that is or will be implemented involves moving a block of code upwards in the file `inc/class_parser.php`. So if the file is available for modification (as opposed to being compiled into an executable), this could be fixed by forum administrators themselves instead of waiting for a new release (the date when a new release will be published is uncertain after all).

Specifically this block in `inc/class_parser.php`

PHP Code:
        // Convert videos when allow.
        
if(!empty($this->options['allow_videocode']))
        {
            
$message preg_replace_callback("#\[video=(.*?)\](.*?)\[/video\]#i", array($this'mycode_parse_video_callback'), $message);
        }
        else
        {
            
$message preg_replace_callback("#\[video=(.*?)\](.*?)\[/video\]#i", array($this'mycode_parse_video_disabled_callback'), $message);
        } 

is moved above this line

PHP Code:
        $message $this->mycode_auto_url($message); 




Users browsing this thread: 1 Guest(s)