nodebb-plugin-youtube-lite creating video frames for regular links?

  • GNU/Linux Admin

    Not sure of the version from npm... but you can manually install the plugin thusly:

    $ cd node_modules/
    $ rm -rf nodebb-plugin-youtube-lite
    $ git clone https://github.com/a5mith/nodebb-plugin-youtube-lite.git
    $ cd nodebb-plugin-youtube-lite
    $ git revert aee6769d4025ad4d87bc4e2121a9dd5dc890ecc5
    $ cd ../..
    $ ./nodebb restart
    

    This is just a temporary fix until @a_5mith fixes the issue. Once he fixes it, you can rm -rf node_modules/nodebb-plugin-youtube-lite and re-install the plugin via the plugins page.


  • Reproduced the issue. Bloody regex. Will see if it's easy to fix.


  • This is now fixed. Update the plugin to latest 0.4.2.


  • @a_5mith Thanks for the quick fix. Maybe it's me but, now the youtube links are not getting embedded? I reloaded the plugin and checked that I have the up to date version.


  • Restart your forum. Then clear cache.


  • @a_5mith I restarted my forums, then cleared my browser cache if that's what you were referring to. I'm still getting the same results? Or did I misinterpret what clearing the cache meant.


  • Ah, my mistake, I forgot about the rel=nofollow that's now a thing. 👎 Give me a moment to add that back in. I completely rewrote the regex for the update.

    It worked for me because I have nofollow turned off. 🙂


  • Can you try 0.4.3 and let me know how that goes. I think I've covered most possible links. Same as before, restart forum, then Ctrl + F5 the page to refresh cache.

    There's two that won't work, but they'll be quite rare. If a URL ends with &feature=related then it won't embed. It will if it's the first parameter in the URL (?feature=related&etc)

    The other links that don't work are links that the user removes the www. from. If it's pasted straight from youtube, it'll work.

    I will take a further look at it at some point, but it should now capture most URLs. Fingers crossed.


  • @a_5mith Still not working it seems. I copy the link from youtube through the share box like this:
    https://youtu.be/H_Djd_teJVw

  • GNU/Linux Admin

    Can you paste the post's markdown for @a_5mith to debug?


  • @julian @a_5mith these a few of the markdowns that are under the youtube "shared" tab links.

    #### Day 7 Finals
    [Day 7 Finals](https://youtu.be/BtUjV47ownU)
    
    #### Day 7 Finals MD M. Ahsan/Hendra Setiawan vs Liu Xiaolong/Zihan Qiu 
    [Day 7 Finals MD M. Ahsan/Hendra Setiawan vs Liu Xiaolong/Zihan Qiu](https://youtu.be/H_Djd_teJVw)
    
    #### Day 7 Finals MS Lee Chong Wei vs Chen Long
    [Day 7 Finals MS Lee Chong Wei vs Chen Long](https://youtu.be/DHldrixwTFw)
    
    #### Day 7 Finals XD Liu Cheng/Bao Yixin vs Zhang Nan/Zhao Yunlei
    [Day 7 Finals XD Liu Cheng/Bao Yixin vs Zhang Nan/Zhao Yunlei](https://youtu.be/a6ZdVjmzZMo)
    
    #### Day 7 Finals WD Zhao Yunlei/Tian Qing vs Christina Ped./Kamila R. Juhl
    [Day 7 Finals WD Zhao Yunlei/Tian Qing vs Christina Ped./Kamila R. Juhl](https://youtu.be/TUhFCkLw7U4)
    
    #### Day 7 Finals WS Carolina Marin vs Saina Nehwal
    [Day 7 Finals WS Carolina Marin vs Saina Nehwal](https://youtu.be/OAxIy8Hw6_k)
    

  • Does it work if you just paste the link directly? Without markdown.


  • 0.4.4, have tested it with your videos, now works. 👍


  • @a_5mith Thanks!! The videos work now! However, I'm not sure if it's the plugin but, now whenever I click on the videos the video panel is smaller than usual? Also, it keeps having that "loading..." label near the bottom for all the videos?


  • The problem is still persisting and thought it was originally because of custom CSS. It seems that no one else is having this issue but me.

    Anyone have an idea what could be going on with the videos?

  • FreeBSD/OpenBSD

    @SimonQ I have NoScript enabled by default. When I go to your forum, the videos are fine. But when I allow javascript from your domain name, they behave like you described. I would look into your custom header (i.e. javascript) if I were you. I hope it helps.


  • @hukadan The strange thing is though is that when I edit and submit the current post the videos are fine and works. However upon refreshing the page again it goes back to the way it was.

    I do not have a custom header but, I do have a custom sidebar which by the looks of it does not seem to affect the links.

    This is a head scratcher for me

  • FreeBSD/OpenBSD

    @SimonQ I am not using the last version of this plugin (I made a fork when the regex issue arised) so I could not reproduce your problem. So I just tried on a testing version of the forum I am in charge and I observe the same behaviour. So it is not just you. I suppose it is a question of tweaking the css though. I will try to have look but I am VERY far to be an expert.


Suggested Topics

| |