• Resolved Vikas Khunteta

    (@vikas_khunteta)


    I have mentioned my issue into the report. Litespeed not using UCSS and CCSS
    Report number:?OEVIGZRP
    Report date:?12/10/2023 17:56:09

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

    (@qtwrk)

    function buffer_output_before( $content ) {
        if (strpos($_SERVER['REQUEST_URI'], "test") !== false){
            error_log( print_r($content, true), 3, '/path/to/your/wp/dump_before.log' );
        }
        return $content;
    }
    add_filter( 'litespeed_buffer_before', 'buffer_output_before', 0);

    please add this to your theme’s functions.php , , replace the /path/to/your/wp/ to the real path

    then open page as https://your_domain.com/?test

    after that , you will see it generates a dump_before.log , please share it to me

    Thread Starter Vikas Khunteta

    (@vikas_khunteta)

    The debug before log has HTML of the homepage. We are not caching homepage so it doesn’t have UCSS but for e.g. this url https://apuestasfree.com/mejores-bonos-ruleta/ruleta-bet365-trucos/ or https://apuestasfree.com/cuotas-athletic-vs-valencia UCSS is generated but not in use. See the attached screenshot.

    dump_before (2).log dump_before (3).log

    Plugin Support qtwrk

    (@qtwrk)

    then please grab the debug log on https://apuestasfree.com/cuotas-athletic-vs-valencia

    Thread Starter Vikas Khunteta

    (@vikas_khunteta)

    Please check dump_before.log

    Plugin Support qtwrk

    (@qtwrk)

    for home page , if no cache , then no optm , for the cuoatas page I need the debug log , from plugin itself, not the code snippet.

    Thread Starter Vikas Khunteta

    (@vikas_khunteta)

    I know if no cache then no optimization but why the UCSS not working for the pages which are cached and UCSS generated by quic.cloud

    debug-log-cuotas.log

    Thread Starter Vikas Khunteta

    (@vikas_khunteta)

    The report I submitted to LiteSpeed has passwordless link, you should be able to access our site backend, let me know if you need help on that.

    Plugin Support qtwrk

    (@qtwrk)

    [Core] Footer check failed: 4-</div></div><div class="site-footer"><div id="footer-widgets" class="site footer-widgets">

    this seems to be the problem , the plugin expects the first few string of source code to be <html or <!DOCTYPE , which is required by HTML standard , yet something on your site does not obey this and output </div> or something as first line of code , which makes plugin thinks this page is incorrect or incomplete , so it byasses optimization to avoid any potential problem.

    Thread Starter Vikas Khunteta

    (@vikas_khunteta)

    How do I debug it more? I don’t know what’s the error because the dump_before.log showing the page starts with <!DOCTYPE HTML> and the footer check failed should be for footer not the header. I also cleared the debug log but now its not generating again, I have tried multiple times to generate new log but not able to do so. Can you provide more debug info on that?

    Plugin Support qtwrk

    (@qtwrk)

    in this line https://github.com/litespeedtech/lscache_wp/blob/5f9ad3b4557c20ef685e47bd2501e722b31767d7/src/core.cls.php#L441

    create a new line before return; with content:

    error_log( print_r($buffer, true), 3, '/path/to/your/wp/anoher_log.log' );

    Thread Starter Vikas Khunteta

    (@vikas_khunteta)

    I think I found why its not working, I have been using ob_start() inside my custom theme and specially inside init hook to get some value which is again used inside wp_footer hook as global variable. I have commented that but still the debug log generating content from footer.php template from main theme.

    Plugin Support qtwrk

    (@qtwrk)

    hmmm? maybe something else was using buffer , like 3rd party plugin or something ?

    please try create a stage site and use minimal theme/plugin , see what it shows.

    Thread Starter Vikas Khunteta

    (@vikas_khunteta)

    I have setup test site, how can I enable page optimization only for specific pages. I don’t want to spend too much credits on test site urls. Do I need to add test domain into quic.cloud as well?

    Plugin Support qtwrk

    (@qtwrk)

    well ,

    if (strpos($_SERVER['REQUEST_URI'], "xxx")?!== false){
    define( 'LITESPEED_DISABLE_ALL', true );
    }

    I have this code snippet for wp-config.php to disable LSCWP on xxx URI , you can use negate condition to make it enabled only on certain URL

    for that footer check/buffer issue , you don’t need to enable these online service after all

    Thread Starter Vikas Khunteta

    (@vikas_khunteta)

    I fixed the Footer check failed on the live site, but still UCSS not being used by the Litespeed, here is new debug-log for https://apuestasfree.com/cuotas-athletic-vs-valencia/

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘UCSS not used by litespeed’ is closed to new replies.