[Pushed] Embedded videos no longer play after upgrading to 1.8.15
After upgrading our forum software from MyBB 1.8.14 to 1.8.15, a couple of members noticed that embedded YouTube videos were no longer playable, and displayed an error message when the play arrow was clicked.

Digging around a bit, I was able to resolve this problem by moving lines 500 to 509 of inc/class_parser.php to just prior to the call to $this->mycode_auto_url on line 453 of the same file. I am not very familiar with the MyBB code, so this may have unintended consequences, but so far everything seems to be OK. Have tested on a vanilla install and confirmed the same problem with same solution.

Emphasising my lack of familiarity with the code, here's (kind of roughly/vaguely and potentially imprecisely) why I think this solution works: the code to convert the video BBCode into an embedded video - the moved lines - expects a bare URL, whereas the code to auto-generate a link out of a bare URL - $this->mycode_auto_url - converts bare URLs to links. Shifting the former code so that it occurs prior to the latter code makes sure a bare URL is passed as expected.
Thank You for reporting & the code analysis.
MyBB Developers will check it & respond.
(however Developers' response might be delayed ...)
No worries. Looking at the code a bit more, it seems that the root cause of the problem was introduced in commit 1b63811f24d915fd48312843fbe0dcf10b707edd where the regular expressions detecting URLs in mycode_auto_url() were adjusted with the effect that now video tags match.
I can confirm this issue. This PR fixed a bug but introduced others within the parser.

PS: your guess was right – the fix you applied on your board is the same I did in my patch PR. It should not affect any other MyCode.
[Image: fSGNVQj.png]

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/3066

Thanks for contributing to MyBB!

The MyBB Group
Hi Support MyBbB.

Have the same issue, when open showthread.php Not Display the Videos.

In Edit Mode Display the Videos

[Image: Captura_de_pantalla_2018_03_17_a_las_9_21_04_a_m.png]
^ have you tried the suggested code changes in ~/inc/class_parser.php file ..
(2018-03-17, 02:45 PM).m. Wrote: ^ have you tried the suggested code changes in ~/inc/class_parser.php file ..

Hi .m. 

Tried with that code changes and upload the file to server, but not fix, test example.
Not going to deep into the issue right at this moment coz .m. is helping on it.

Just indicating the playing problem for further debug. Your parsed video iframe has an open target tag issue:

<iframe width="560" height="315" src="//www.youtube.com/embed/dyZ3Qh8DUGM" target" frameborder="0" allowfullscreen=""></iframe>

If you can figure out to omit the broken target tag ( target" part) and make it:

<iframe width="560" height="315" src="//www.youtube.com/embed/dyZ3Qh8DUGM" frameborder="0" allowfullscreen=""></iframe>

or correct the syntax atleast by converting target" to target=""

<iframe width="560" height="315" src="//www.youtube.com/embed/dyZ3Qh8DUGM" target="" frameborder="0" allowfullscreen=""></iframe>

... the video starts playing.
Is it possible for you guys to release a 1.8.15 hotfix with solution to this issue?

Forum Jump:

Users browsing this thread: 1 Guest(s)