• Resolved rahuldhangar

    (@rahuldhangar)


    Hello,
    Thanks a lot for such a nice piece of work, I really love your plugin when it comes to simplicity. But there is an issue coming on my website that when I use W3 Total Cache plugin on the website the logo slider stops showing up. I have inserted the slider into my Template using this code: echo do_shortcode(‘[logo-slider]’); in the header.php file and it perfectly works well if I visit website after disabling the W3TC plugin but soon I enable it, the cached pages served to me have no slider on it!
    You can visit the website where I implemented this logo slider by following this link: http://bit.ly/fcb_nl
    Your help is highly appreciated over it and hope to see a response from the author and community asap. 🙂

    https://wordpress.org/plugins/logo-slider/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Maeve Lander

    (@enigmaweb)

    Thanks for reporting this issue with W3TC… I can see another user has also reported this, so I will investigate ASAP and try to find a solution.

    Thanks,
    Maeve

    Thread Starter rahuldhangar

    (@rahuldhangar)

    Dear Maeve,

    Let me lighten up your burden over this. I found the conflicting lines of code and here is the detail:

    Within the function logo_slider() in the plugin file logo-slider.php, please add this piece of code after line 571:

    else{
                $data_chunks = array_chunk($wp_logo_slider_images, $num_img);
    	}

    So the complete if-else ladder looks like:

    if( $iPod || $iPhone ){
                $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
    	}else if($iPad){
                $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
    	}else if($Android){
                $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
    	}else if($webOS){
                $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
    	}else if($mobile){
                $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
    	}else if($BlackBerry){
                $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
    	}else if($RimTablet){
                $data_chunks = array_chunk($wp_logo_slider_images, $img_num4);
    	}else if(($msie) || ($firefox) || ($safari) || ($chrome) || ($IE11)){
                $data_chunks = array_chunk($wp_logo_slider_images, $num_img);
    	}else{
                $data_chunks = array_chunk($wp_logo_slider_images, $num_img);
    	}

    You skipped the final else{} statement due to which if the User Agent does not matches the one from list it don’t show the logo images while the page loads. Now how it was conflicting with W3TC specifically?
    Answer is: When any Search-Bot (or the Cron-Job which runs in background as a setting in W3TC to pre-load the pages’ cache) tries to visit any page which is not yet cached on disk, the logo-slider plugin skips showing logo images to them and eventually the cache file generated for the page during this operation has no logo-slider showing up on the page.

    I hope to see amendment in your next upcoming version of this plugin. I also have one more small thing to put into your consideration for the next version of this plugin and will be happy to discuss it with you. Feel free to contact me via contact email given on my website/blog (you can find it by visiting my profile)

    Cheers!

    Plugin Author Maeve Lander

    (@enigmaweb)

    Thanks so much for your assistance with this patch @rahuldhangar. Very much appreciate your help. I will check out the patch and make sure it is included in next update.

    Thanks again.

    Thread Starter rahuldhangar

    (@rahuldhangar)

    @MaeveLander: Pleasure is all mine 🙂
    Always happy to help.
    (PS: kudos to your efforts in making such an awesome & free plugin; 5 stars from my side)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Logo Slider conflict with W3 Total Cache’ is closed to new replies.