infinitymusics
Forum Replies Created
-
Forum: Plugins
In reply to: [Super Page Cache] How to solve the pagination cache problem?Hi, i think it is the codings issue as you had mentioned that it only purge 1. The home page (not any paginations under it) , so it means it will never purge the page eg. https://example.com/page/2/, https://example.com/page/3/, https://example.com/page/4/, https://example.com/page/5/ …
I had customized the codings in so it will works for purging the home page and paginations under it.
In my functions.php, i add extra count total posts function.
// Count total posts.
function count_total_posts() {
$count_post = wp_cache_get(‘count_all_post’);if ($count_post === false) {
$count_post = wp_count_posts()->publish;
wp_cache_set(‘count_all_post’, $count_post);
}return $count_post;
}In /wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php
start from lines: 1113
// Purge the home page as well if SWCFPC_HOME_PAGE_SHOWS_POSTS set to true
if( defined( ‘SWCFPC_HOME_PAGE_SHOWS_POSTS’ ) && SWCFPC_HOME_PAGE_SHOWS_POSTS === true ) {
array_push($listofurls, home_url(‘/’));// Changes
if( $this->main_instance->get_single_config(‘cf_post_per_page’, 0) > 0 ) {
$post_count = count_total_posts();
$post_pages_number = ceil($post_count / $this->main_instance->get_single_config(‘cf_post_per_page’, 0) );for ($j=2; $j<=$post_pages_number; $j++) {
$home_paginated_url = home_url(‘/page/’) . user_trailingslashit($j);
array_push($listofurls, $home_paginated_url);
}
}
}So it will work for purging the homepage as well as the pagination under it.
@isaumya Do you have any suggestion for the codings and how can I improve it?
Forum: Plugins
In reply to: [PWA] PWA is not compatible with Cloudflare Rocket Loader.This is because if in WP Rocket caching mode, it will cache anything except the ?query parameter or users defined NEVER CACHE URL, I had defined it /wp.serviceworker in NEVER CACHE URL otherwise it will cache the /wp.serviceworker just like the directory or post page which will caused problem that I had stated above.
Forum: Plugins
In reply to: [PWA] PWA is not compatible with Cloudflare Rocket Loader.I choose the second way to fix the issue by putting /wp.serviceworker in the Never Cache URL(s) box which inside WP rocket Advanced Rules settings because as previous version frontend service worker /?wp_service_worker=1 which will not be cached by wp rocket default as it has query parameter..
Forum: Plugins
In reply to: [PWA] PWA is not compatible with Cloudflare Rocket Loader.Actually it has problem with both plugin wp rocket and cloudflare rocket loader.
Either i need to disable the cloudflare rocket loader or the second way is to set /wp.serviceworker in the Never Cache URL(s) which inside WP rocket Advanced Rules settings in order to let PWA work.Forum: Plugins
In reply to: [PWA] PWA is not compatible with Cloudflare Rocket Loader.The wp.serviceworker can has the .js extension caused otherwise it will being cached like normal html page…
Forum: Plugins
In reply to: [PWA] PWA is not compatible with Cloudflare Rocket Loader.OK, my site is at here https://ryo.to/Edvrli with wp-rocket and cloudflare rocket loader and now i turned on the Settings > Reading > Offline browsing for you to debug. If finished do let me know, because I need to cleared the caches turn it off as wp rocket and cloudflare will cached it.
Thank you!
Forum: Plugins
In reply to: [Fast Velocity Minify] Cron JobIs that this codes which in this file /wp-content/plugins/fast-velocity-minify/inc/functions.php caused the problem? I also had these problems as the cronjob will keep creating by themself…. otherwise like me it will have many almost above 1500 ‘fastvelocity_purge_old_cron_event’ cronjob in background so i debugs it today. I had changed the original codes below
Change
if (!wp_next_scheduled (‘fastvelocity_purge_old_cron’)) {
wp_schedule_event(time(), ‘daily’, ‘fastvelocity_purge_old_cron_event’);
}to
if ( !wp_get_schedule( ‘fastvelocity_purge_old_cron_event’ ) )
wp_schedule_event( time(), ‘daily’, ‘fastvelocity_purge_old_cron_event’ );I still testing and hope it will works!
Sorry for late reply. Thank you for your both awesome reply!
How about if i just stay the same code as original ones, not adding the above filter, will that affect SEO ?
Ya, you said it correctly! Google, baidu trim at roughly 80 Han characters! So is that i just followed this setting right and put it in my child theme function ? Thank you for reply and testing it out for me! Really great support and i use Yoast before but i am not satisfy with the speed and their lack of article schema as well. Found out yours plugin did all the nice stuff!!!
add_filter( 'the_seo_framework_input_guidelines', function( $guidelines ) { // Hanzi adjustments. $guidelines['description']['search']['chars'] = [ 'lower' => 23, // end red, start yellow 'goodLower' => 40, // end yellow, start green 'goodUpper' => 80, // end green, start yellow 'upper' => 160, // end yellow, start red ]; return $guidelines; } );
Forum: Plugins
In reply to: [The SEO Framework – Fast, Automated, Effortless.] robots.txt file issuesI also had this problem. It is not working for me. I need to manually do it. I also never ever check the Search Engine Visibility because i definitely welcome google search.
Forum: Plugins
In reply to: [Super Progressive Web Apps] Chrome works fine but Firefox JS ErrorI changed the code to become like this so it will works.
// Install
self.addEventListener(‘install’, function(e) {
console.log(‘SuperPWA service worker installation’);
e.waitUntil(
caches.open(cacheName).then(function(cache) {
console.log(‘SuperPWA service worker caching dependencies’);
//return cache.addAll(filesToCache);/*
Solution 1
return Promise.all(
filesToCache.map(function (url) {
return cache.add(url).catch(function (reason) {
return console.log(url + “failed: ” + String(reason));
});
})
);*/// Solution 2 without debug
return Promise.all(
filesToCache.map(function(url){ cache.add(url) })
);
})
);
});Forum: Plugins
In reply to: [Super Progressive Web Apps] Chrome works fine but Firefox JS ErrorIt can be see in both homepage and post page. Thank you and hope hearing for the solutions soon.
Forum: Plugins
In reply to: [Super Progressive Web Apps] Chrome works fine but Firefox JS ErrorI had try remove fallbackImage from filesToCache so it becomes const filesToCache = [startPage, offlinePage]; but it still not working.