• Resolved ellenpop

    (@ellenpop)


    Hello! Great plugin. I tried enabling LiteSpeed’s lazy loading today, but I haven’t seen evidence of it showing up on my site (I don’t see any data-lazyloaded=”1″ in devtools).

    I tried all of the troubleshooting ‘read this first’ steps before writing this.

    First I made sure to scrub the default WP lazy loading everywhere I could. I still see it (loading=”lazy”) in my related posts, but otherwise it is all gone. Here’s the code I used to remove the default WP loading=”lazy”:

    if (!defined('ABSPATH')) die();
    
    add_filter('wp_lazy_loading_enabled', '__return_false');
    
    function disable_lazy_load_featured_images($attr, $attachment = null) {
    	$attr['loading'] = 'false';
    	//This used to be eager but I changed it to false to remove the loading attribute entirely
    	return $attr;
    }
    add_filter('wp_get_attachment_image_attributes', 'disable_lazy_load_featured_images');

    I have lazy loading enabled in LiteSpeed’s settings, but still don’t see data-lazyloaded=”1″ anywhere in my site. (I also added a CSS animation for fading in the LiteSpeed lazy load, which currently isn’t doing anything because there’s nothing on the site with a data-lazyloaded attribute.)

    Any advice is appreciated!

    Report number: XNQVAPNM

    Thank you very much for all your help! ??

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Support qtwrk

    (@qtwrk)

    please follow this guide to enable the debug log

    see what log says about the lazyload.

    Thread Starter ellenpop

    (@ellenpop)

    Thanks for your reply.

    The log doesn’t say anything about the lazyload, or loading in general. I can’t find anything in it that looks related.

    Plugin Support qtwrk

    (@qtwrk)

    I might have an idea

    please try follow through this process first, then enable lazyload and try again.

    Thread Starter ellenpop

    (@ellenpop)

    This is also making me wonder whether other parts of LiteSpeed aren’t working properly on my site right now. I’ve been setting up various LiteSpeed configurations for performance all day (such as minifying and combining and inlining CSS and JS, creating UCSS, setting up with QUIC.cloud, loading CSS asynchronously, turning on both guest mode and guest optimization, etc. Through all this I haven’t seen any change in my Page Insights speed (it remains in the 90s on desktop and the 70s on mobile, exactly the same as before). This surprised me, since an article from LiteSpeed showed how guest mode alone has a huge impact on site speed.

    I’ve been clearing the cache of both my browser and LiteSpeed regularly. Is there possibly something really obvious I’m missing that’s making large chunks of the plugin not work?

    It is serving images as webp (at least, most of them… some of them are still being served as pngs, as are all the post thumbnails, and I optimized all images at once today, so I’m not sure what the distinction is), so I know at least part of it is working.

    Thread Starter ellenpop

    (@ellenpop)

    To top it all off, I just got an ERROR 520
    (The QUIC.cloud server NA-US-IAD-57 was not able to connect to the site’s origin server.) However, the documentation states that the LiteSpeed web server will automatically update allowlist IPs, and curl is telling me I am on a LiteSpeed server.

    (Thanks for reading and sorry for mentioning several issues! I’m putting them all here in case it looks like there might be something obvious big picture that I’ve missed that would solve my original issue.)

    Edit: that 520 error went away after a few minutes and another curl revealed I’d successfully connected with NA-US-IAD-57, while the ones just a few minutes prior were from NA-US-IAD-265. It looks to me like the site went down for a minute between changing server IPs until it automatically added the 57 number to the allowlist. Is this typical of QUIC.cloud?

    • This reply was modified 2 years, 4 months ago by ellenpop.
    Plugin Support qtwrk

    (@qtwrk)

    yes, but besides LSWS/OLS’s allow list, there could be many other firewall or security measure in place, like server firewall , mod_security , datacenter firewall …etc

    Thread Starter ellenpop

    (@ellenpop)

    Thank you. Sorry I just saw your replies- I will try the database repair.

    Thread Starter ellenpop

    (@ellenpop)

    I repaired the database following the instructions, confirmed the file output ‘done’, deleted repair.php, and enabled lazy loading again. Same thing. Still no lazy loading. (Page speed is still exactly the same with all the features of LiteSpeed disabled too.) I checked the log again, but there was nothing there about the loading.

    Plugin Support qtwrk

    (@qtwrk)

    please share log.

    Thread Starter ellenpop

    (@ellenpop)

    07/06/22 01:24:11.112 [147.135.115.64:60862 1 u67] [Ctrl] 301 from https://thescentaur.com/wp-admin/admin.php
    07/06/22 01:24:11.112 [147.135.115.64:60862 1 u67] [Ctrl] 301 to https://thescentaur.com/wp-admin/admin.php?page=litespeed-toolbox
    07/06/22 01:24:11.112 [147.135.115.64:60862 1 u67] [Ctrl] X Cache_control -> no Cache ( 301 to same url )
    07/06/22 01:24:11.112 [147.135.115.64:60862 1 u67] ?? [Tag] Add — HTTP.302
    07/06/22 01:24:11.113 [147.135.115.64:60862 1 u67] [Ctrl] not cacheable before ctrl finalize
    07/06/22 01:24:11.113 [147.135.115.64:60862 1 u67] [Router] get_role: administrator
    07/06/22 01:24:11.114 [147.135.115.64:60862 1 u67] [Vary] set_cookie —> admin_bar:1;logged-in:1;role:99
    07/06/22 01:24:11.115 [147.135.115.64:60862 1 u67] ?? X-LiteSpeed-Cache-Control: no-cache
    07/06/22 01:24:11.115 [147.135.115.64:60862 1 u67] End response
    ——————————————————————————–

    07/06/22 01:24:11.494 [147.135.115.64:60950 1 jgS] ?? ——GET HTTP/1.1 (HTTPS) /wp-admin/admin.php
    07/06/22 01:24:11.494 [147.135.115.64:60950 1 jgS] Query String: page=litespeed-toolbox
    07/06/22 01:24:11.494 [147.135.115.64:60950 1 jgS] HTTP_REFERER: https://thescentaur.com/wp-admin/admin.php?page=litespeed-toolbox
    07/06/22 01:24:11.494 [147.135.115.64:60950 1 jgS] Cookie _lscache_vary: admin_bar:1;logged-in:1;role:99
    07/06/22 01:24:11.598 [147.135.115.64:60950 1 jgS] [Ctrl] X Cache_control -> private ( logged in user )
    07/06/22 01:24:11.691 [147.135.115.64:60950 1 jgS] [Ctrl] X Cache_control -> no Cache ( Admin page )

    Thread Starter ellenpop

    (@ellenpop)

    Here, my last attempt to share the log was held for moderation. Let’s see whether this works:

    07/06/22 01:24:11.112 [147.135.115.64:60862 1 u67] [Ctrl] 301 from https://thescentaur.com/wp-admin/admin.php
    07/06/22 01:24:11.112 [147.135.115.64:60862 1 u67] [Ctrl] 301 to https://thescentaur.com/wp-admin/admin.php?page=litespeed-toolbox
    07/06/22 01:24:11.112 [147.135.115.64:60862 1 u67] [Ctrl] X Cache_control -> no Cache ( 301 to same url )
    07/06/22 01:24:11.112 [147.135.115.64:60862 1 u67] ?? [Tag] Add — HTTP.302
    07/06/22 01:24:11.113 [147.135.115.64:60862 1 u67] [Ctrl] not cacheable before ctrl finalize
    07/06/22 01:24:11.113 [147.135.115.64:60862 1 u67] [Router] get_role: administrator
    07/06/22 01:24:11.114 [147.135.115.64:60862 1 u67] [Vary] set_cookie —> admin_bar:1;logged-in:1;role:99
    07/06/22 01:24:11.115 [147.135.115.64:60862 1 u67] ?? X-LiteSpeed-Cache-Control: no-cache
    07/06/22 01:24:11.115 [147.135.115.64:60862 1 u67] End response
    ——————————————————————————–
    
    07/06/22 01:24:11.494 [147.135.115.64:60950 1 jgS] ?? ——GET HTTP/1.1 (HTTPS) /wp-admin/admin.php
    07/06/22 01:24:11.494 [147.135.115.64:60950 1 jgS] Query String: page=litespeed-toolbox
    07/06/22 01:24:11.494 [147.135.115.64:60950 1 jgS] HTTP_REFERER: https://thescentaur.com/wp-admin/admin.php?page=litespeed-toolbox
    07/06/22 01:24:11.494 [147.135.115.64:60950 1 jgS] Cookie _lscache_vary: admin_bar:1;logged-in:1;role:99
    07/06/22 01:24:11.598 [147.135.115.64:60950 1 jgS] [Ctrl] X Cache_control -> private ( logged in user )
    07/06/22 01:24:11.691 [147.135.115.64:60950 1 jgS] [Ctrl] X Cache_control -> no Cache ( Admin page )

    Hopefully that goes through ??

    Plugin Support qtwrk

    (@qtwrk)

    the log is not correct , it’s showing /wp-admin/admin.php

    try this

    go to debug setting -> URI inlclude , add something like “test123”

    clear current log

    access your page where you have issue with lazyload , but attach with query string ?test123

    like https://yourdomain.com/something?test123

    now check the log , remove sensitive information , post it to https://pastebin.ubuntu.com/ or any other text share site , or just make a text file and put it somewhere like google drive , dropbox for share

    Thread Starter ellenpop

    (@ellenpop)

    Thanks for the instructions! Still nothing in the log related to lazy load. You can find it here.

    Plugin Support qtwrk

    (@qtwrk)

    you have option “optimize for guest only” only enabled, and you were visiting as login user,

    try with private window or disable this option , purge all and check again.

    Thread Starter ellenpop

    (@ellenpop)

    Done. Still no lazy load. I can’t seem to get anything to show up in log at all anymore. No matter how much I click around the site, in a private window or not, nothing shows up.

    I did just disconnect from the QUIC.cloud CDN today because it was causing a 508 error on my site. I checked with my hosting, I’m nowhere near any resource limits, and the error goes away when I turn the CDN off. Does the log rely on being connected to the CDN?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Lazy Load Not Working’ is closed to new replies.