Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Frank Goossens

    (@futtta)

    I *think* it’s because the lyte-JS is autoptimized (which in itself works) and is rocket-scripted via cloudflare. can you try if disabling rocketscript solves this?

    frank

    Thread Starter TheHungryGeek

    (@thehungrygeek)

    Yes it works without Rocket Loader. Looks like I’ll have to find a way to add the data-cfasync="false" attribute to the plugin’s script tags then. Is there an easy way to do that?

    Hmm, looks like that tag will have to be added to the autoptimize.js for it to work. Oh wells.

    Plugin Author Frank Goossens

    (@futtta)

    hurrah for the AO API! ??

    add_filter('autoptimize_filter_js_defer','noRocketsForAO',10,1);
    function noRocketsForAO($in) {
        return $in."data-cfasync=\"false\" ";
    }

    frank

    Thread Starter TheHungryGeek

    (@thehungrygeek)

    Wow thanks for the help Frank. The code works but unfortunately that small change broke one part of my theme lol. I have no idea why.

    I have just permanently disabled Rocket Loader on Cloudflare for now and it works fine.

    Plugin Author Frank Goossens

    (@futtta)

    I have just permanently disabled Rocket Loader on Cloudflare

    that, to me, is the best possible solution really (even CF states this is a beta feature) ??

    have a nice weekend,
    frank

    Good day Frank,

    I have been experiencing the same issue.
    I was just wondering if a a solution was ever figured out?
    Where would you add the code:

    add_filter(‘autoptimize_filter_js_defer’,’noRocketsForAO’,10,1);
    function noRocketsForAO($in) {
    return $in.”data-cfasync=\”false\” “;
    }

    I know the YouTube Lyte works with the rocket-scripted via cloudflare turn off. But once it is turned on, it breaks it and all that appears is a grey screen. But this really slows the load time down, Any help would be very much welcomed.
    I was hoping for a functions.php fix, similar to what I uses to not defer the other required .js files.

    All the best,
    Clint

    Plugin Author Frank Goossens

    (@futtta)

    hi clint;
    are you using Autoptimize AND wp youtube lyte as well? if so you can place the code snippet in your functions.php and it will ensure the autoptimized JS-file is not rocketloaded (which is deferred already, so there’s no use for rocketloader for the AO-JS-file anyway).

    hope this helps,
    frank

    Good day Frank,

    Many thanks for your help, I did exactly what you said. Turned off Cloudflare and enabled Autoptimize for the java. It really slowed the page speed down as I had to add some exclusions to the .js exclusion list in Autoptimize settings, just for one URL to function correctly. So i used added a filter in functions.php for Autoptimize .js exclusion for that one URL.

    The page speed is not as high as when Cloudflare is enabled but at least it provides 100% functionality! I looked at adding in a filter to Cloudflare but it looks like it may cause more issues than it solves!

    I tried adding the code snippet to the functions.php and re-enabling rocket launcher but all .js then didn’t work.

    So for now it’s Autoptimise and Cloudflare Off

    Many thanks for the help Frank, absolutely awesome ??

    Good day Frank,

    Cloudflare speeds up our site using Rocket Launcher to a good speed. I tried the functions.php code and it kept crashing the site. Hopefully in the future Cloudflare can be an added option ??

    All the best,
    Clint

    Plugin Author Frank Goossens

    (@futtta)

    there are too many options already @00help ??

    if the problem is your lyte vids are not showing when combined with AO & RocketLoader, you could try excluding wp youtube lyte’s JS from autooptimization?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Grey screen instead of Youtube video’ is closed to new replies.