Skip Navigation

[Resolved] YourChannel creating error messages when Views pagination is triggered

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 10 replies, has 2 voices.

Last updated by nickT-2 3 years, 9 months ago.

Assisted by: Jamal.

Author
Posts
#2023293

Hi Jamal,

Further to our chat earlier today about the YourChannel plugin not working for paginated content.

I sent over our chat and screenshots to the YourChannel support. Here is what they've said:

............................

Hi, check the code in line 2318:

    YRC.run = function(shell){
        if(!shell.attr('data-yrc-setup') && shell.length){

Run that code if the shell parameter is not undefined. Currently it's undefined so the error is produced.

Every shortcode generated by YourChannel is wrapped in an element with class .yrc-shell-cover and that element is passed to the YRC.run function.

..........................

I'm not sure if they are saying that it should be working or if they are suggesting a workaround. Does what they've said make any sense.

I've not removed the staging site yet in case you need to have another look. If you need login details again please let me know and I can fill in the form again.

Thanks
Nick

#2023569

Hello Nick,

Yes, please fill in the login details again, the chat was marked as resolved and the credentials were automatically removed. Your next reply will be private to let you share credentials safely.

#2024353

Hello Nick,

I believe the issue comes from a bug in the plugin's shortcode. The plugin's runs the "YRC.run()" function when the "yrc.newchannel" event is triggered. Check this screenshot hidden link
The function expects a variable shell to be passed to it, as you can see in this screenshot hidden link

Now, this bug is triggered by the Javascript code generated by the plugin's shortcode. The Javascript code on a certain condition will trigger the "yrc.newchannel" event and cause errors in the console. Check this screenshot hidden link

If I comment on the erroneous call to the function, those errors are not generated anymore. hidden link

Please reach again to the plugin's support and ask them why they are triggering the "yrc.newchannel" event using the shortcode.

To isolate this from other parts and components of your website, I wonder if you would like to reproduce these issues in one of our test sites. This way we can isolate it to only this plugin and Toolset, using a default theme. And If the issue persists and I can't resolve it, I'll escalate it to our 2nd Tier.
Log into our test site using this URL hidden link

#2024391

Hi Jamal,
Thank you so much for having another look. I've passed on your comments and question to them.

In the meanwhile I've populated the sandbox site with some test posts, a test page and installed the YourChannel plugin. For some reason the bootstrap modal lightbox isn't working. Should this work out of the box?

Update - I found the bootstrap on button in the Toolset settings. So the modal lightboxes are all working. The error messages are showing as before on the test page. (don't know if I should put the live link in the chat) but there is only one page ... so easy to find.)

#2024441

Hi Jamal,

Update from YourChannel support. They've said:

Hi, if commenting out doesn't generate errors, you can keep it commented.

yrc.newchannel was built to handle shortcodes generated by ajax, but I think it is never used by anyone and I haven't checked it in a long time too.

....................

Not an ideal reply as I guess any plugin update would wipe this out. What do you think? Is that possible?
Thanks
Nick

#2024867

Hello Nick,

You are right, any new update would wipe out the comment. Unless they introduce an update that handles this case. But, I still think, that besides the ugly errors that output in the console, there is no real harm caused by this error. I visited the videos in a few pages of the slider and some of them work and others are not available. Those unavailable are probably caused by another issue than these errors.

#2024875
YRC - error messages.JPG
YRC - mod.JPG

Hi Jamal,

It would be good to get it working with no errors and I'll then ask the YourChannel dev to update.

It would also be good to fix to narrow down any other error messages.

So ... I think I found the right bit which I've now commented out that line, screenshot attached.

But I still seem to be getting the error messages, 2nd screenshot attached.

Are these the same error messages or unrelated to what you've said? If you can't see some videos this might be a YouTube territory issue with YouTube rather than anything on the website.

Thanks
Nick

#2024919

I think these errors are related to how the Youtube API is called, the options that were passed to the Youtube API call in the URL parameters. These parameters are generated by the plugin's shortcode.

A search online reveals multiples possible causes, all come down to the HTTP protocol (HTTP or HTTPS) or to parameters passed to the API call:
- https://stackoverflow.com/questions/27573017/failed-to-execute-postmessage-on-domwindow-https-www-youtube-com-http
- hidden link
- hidden link

#2024975

Hi Jamal,

Thank you again for having a look and I really appreciate the time you've taken looking into this.

Unfortunately it sounds like there are more fundamental issues with the way the plugin has been coded. It also seems that the plugin isn't really being actively developed so I doubt the author is willing to re-code from the bottom up, which it sounds like it might need.

Annoying I think it might be time to look for an alternative plugin. Would you come to the same conclusion?

#2025083

Well, if you have a simple use case for embedded Youtube video, you may just generate it in the view or content template without needing a 3rd plugin for it. Check this article
Something like:

<iframe width="560" height="315" src="<em><u>hidden link</u></em> field='youtube-video-id' output='raw']" frameborder="0" allowfullscreen></iframe>

Just keep in mind to use the embed endpoint(hidden link) instead of the watch endpoint (hidden link).

If you need full control over the YouTube player, you'll need to hire a developer to sort everything out. Check the list of our contractors here https://toolset.com/contractors/

#2027351

Hi Jamal, Thank you so much for all the time you've put into looking into the issue. I think for now I'll do as you suggest with a simple YT embed and will explore options for custom development or maybe I'll be lucky and find another plugin that I can test to pull through the other bits from YouTube.

Best wishes
Nick