Wordpress LScache Plugin: ESI settings + Shortcode for Geolocation plugin usage in cached page
Hi, @CacheCrawler I hope you are doing great.. I wanted some help with this plugin setup which might not work correctly because of LS cache. As i can see in the previous support you have mentioned to enable ESI and to add [esi my_shortcode ttl= 0 ] like this in shortcode? My question is if my short code is like this > [geoip_detect2_show_if country= GB ] This block will be shown if the visitor is in the GB (UK): [content-egg-block template=offers_list locale=GB] [/geoip_detect2_show_if] where do i need to add [ESI & TTL= SECONDS ] in above shortcode example or do i need to add cache= private as well in [ESI & TTL= SECONDS ]? Thank you. if your shortcode is [geoip_detect2_show_if country= GB ] then can try [esi geoip_detect2_show_if country= GB ttl=0 ] Yes, I tried to use it that way but this geo location shortcode has to be used like this below.. [geoip_detect2_show_if country= IN ] [esi content locale=IN ttl= 43000 ] [/geoip_detect2_show_if] in this case, do i need to put esi in all three shortcodes? starting with [ and ending with] Like this below? [esi geoip_detect2_show_if country= IN ttl= 43000 ] [esi content locale=IN ttl= 43000 ] [/esi_geoip_detect2_show_if_ttl= 43000 ] this last line above / is not working properly when added esi!@CacheCrawler can you let me know how should i use these 3 lines of code correctly? with esi! Hii.. @benjamin4 can you help me with this? Are you using AJAX mode? Im not sure what Esi does but AJAX mode is made for page caching plugins active. Yes? I was using AJAX mode. But, @benjamin4 unfortunately I had to remove the plugin from website as it breaked my website please check here, (only in WooCommerce product pages), though I still havent used any shortcodes anywhere in the website. (Initially I thought Litespeed ESI might be the reason for this issue, but when I checked my email?.) I also got an email from WordPress yesterday about this Technical Issue like this below, Error Details ============= An error of type E_ERROR was caused in line 246 of the file /home/review23/public_html/wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php. Error message: Uncaught Error: Call to undefined method MaxMind Db Reader::getWithPrefixLen() in /home/review23/public_html/wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php:246 Stack trace: #0 /home/review23/public_html/wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php(217): GeoIp2 Database Reader->getRecord(Country, Country, 18.104.22.168) #1 /home/review23/public_html/wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php(90): GeoIp2 Database Reader->modelFor(Country, Country, 22.214.171.124) #2 /home/review23/public_html/wp-content/plugins/advanced-ads-geo/public/public.php(196): GeoIp2 Database Reader->country(126.96.36.199) #3 /home/review23/public_html/wp-content/plugins/advanced-ads-geo/public/public.php(90): Advanced_Ads_Geo::check_geo_default(Array) #4 /home/review23/public_html/wp-content/plugins/advanced-ads/classes/visitor-conditions.php(238): Advanced_Ads_Geo::check_geo(Array, Object(Advanced_Ads_Ad)) #5 /home/review23/pub Thank you, Let me know if this issue is resolvable? I will definitely install it again. Resolved : If anyone wants to use Geolocation plugin with Litespeed Cache plugin you have to Enable AJAX endpoint in settings (Geolocation plugin) if pages are cached. There is no issue with Litespeed & you dont have to enable ESI as well.