Winston
Forum Replies Created
-
Forum: Reviews
In reply to: [WP Super Cache] okSorry about that, I’m an idiot. The other plugin we use have almost the same name, and they recently renamed it to remove “Cloudflare” from the title, which caused confusion. We had the wrong plugin installed, that’s entirely our fault.
Forum: Plugins
In reply to: [W3 Total Cache] Another PHP 8.2 Deprecation Message – Minify settingsit’s true i get the same error on a fresh install on php 8.3
Forum: Plugins
In reply to: [Social Sharing Plugin - Sassy Social Share] Reddit link is not HTTPS2 months later the bug is still not fixed, despite updates in your plugins.
This problem causes invalid SSL and not secure warnings in Chrome.
We’re talking here about literally a 1-character fix, just add a “s” after the http in your code. But you didn’t do it after 2 months.
Uninstalled plugin on 15 sites.
Forum: Plugins
In reply to: [YARPP - Yet Another Related Posts Plugin] update to php 8.2When will it be fixed? PHP 8.2 was released in November 2022
Sorry for the confusion, I am talking about Super Page Cache for Cloudflare
To make debugging easier, we have currently disabled Cloudflare caching (site paused in CF) and WP Super Page Cache for CF. So the only cache is W3TC right now.
If I disable W3TC completely, then the homepage correctly shows the max-age=3600 (generated by the header.php code I posted earlier)
Now if I delete everything in /wp-content/cache/ then ONLY the first hit to the homepage will show the max-age=3600 header
Any subsequent hit on the homepage, and the header is now completely gone. As soon as W3TC generates the page cache and saves the index.html in /wp-content/cache/ then the max-age=3600 header is gone
Still seeing those errors with version 5.30.3
Hi, thanks for the reply
The problem is not the use of 2 caching plugins, but the fact that W3TC is overwriting the headers. If the caching headers would be correct, then CF would respect them and not cache the page. Let’s try to fix the headers and see how it goes.
WP Super Cache is designed to support 2 layers of caching. They call the WP page cache “fallback page cache” and if W3TC is not enabled then they recommend to use their own fallback page cache.
If we have to disable one of the plugins, then it would definitely be W3TC because CF cache has much better improvement on overall loading speed, and when W3TC is disabled the cache works perfectly without any issue. But we would still like to use it as fallback page cache. Just need to fix the headers.
By default, W3 Total Cache does not cache pages with query strings, so if that random query string is cached, it may be cached by the other plugin.
WP Super Cache doesn’t cache query string neither, and CF will not cache a max-age=0 if the headers are not overwritten.
In this case, you have cached the pages with W3 Total Cache, WP Super Cache, and Cloudflare.
WP Super Cache doesn’t cache anything, it just an integration of CF “cache everything” rule, so we have 2 layers of caching and not 3. The other layers of caching are disabled when the max-age=0 header is not being overwritten by W3TC.
The problem with the Browser Cache rules is the fact that the Cloudflare browser Cache TTL is not configured to respect the origin headers. You need to configure Cloudflare Browser Cache TTL to respect the origin header
CF will never cache a page if the browser cache returns a max-age of zero:
“Resources that match a Cache Everything Page Rule are still not cached if the origin web server sends a Cache-Control header of max-age=0, private, no-cache, or an Expires header with an already expired date.” https://developers.cloudflare.com/cache/concepts/customize-cache/
We even tried overriding the CF Cache TTL with a page rule, tested both with Origin Cache Control on or off: https://prnt.sc/vjmi04trPpYp
Also, if the wp super cache is setting headers you may encounter the issues.
This option is disabled https://prnt.sc/izMNk2nC37cd
https://developers.cloudflare.com/cache/concepts/default-cache-behavior/
The page you linked says “Cloudflare does not cache the resource when:
The Cache-Control header is set to private, no-store, no-cache, or max-age=0″The cache-control header on the homepage is set to no-cache max-age=0 when W3TC is disabled. But when W3TC is enabled, this header is overwritten with a max-age=86400
Can you please clarify what “WP Super Cache plugin (W3TC support built-in)” means?
It has options built-in to support W3TC, even if they recommend using their own page cache. It is supposed to automatically purge CF cache when W3TC flushs its caches https://prnt.sc/qeeTF4OEHVgY
- Manually delete the wp-content/cache/ folder
- Configure the Cloudflare to respect the origin headers
- In W3 Total Cache settings enable “Don’t cache pages for logged in users” and disable “Don’t cache pages for following user roles”
- Make sure to save all settings and purge the cache and also purge the Cloudflare cache.
Already tried all this
The calls supposedly are “legitimate” but none of you guys could even explain what is the purpose and why it is required to make such requests just for sitemap and infinite scroll.
There are absolutely ZERO valid reasons to make these calls just for a sitemap and infinite scroll, and as a programmer, YOU KNOW IT.
As I have already mentioned, ALL jetpack modules and features are disabled except the sitemap and infinite scroll. ALL.
The fact is Jetpack is garbage filled with bloatware.
Thanks for the completely useless support. Our #1 priority is now to completely disable Jetpack on the 30+ websites we are hosting.
Can you please explain how sending so many spawn-sync requests (sometimes 10 per minute) is normal behavior for a plugin that we use ONLY for infinite scroll and sitemap? This doesn’t make any sense to me and this is very frustrating that there is no option to disable those requests
Jetpack is simply not worth slowing down the server just for infinite scroll and sitemap. I wish we could just completely get rid of it but unfortunately, Baskerville requires Jetpack for infinite scroll
On another website, I have 68 newsletter stuck at “sending” with 0 out of 0 ???
Forum: Plugins
In reply to: [WP Popular Posts] populate index with custom query by viewsHmm maybe not related to the 100k posts because if I try this query instead:
$args = array( "post_type" => "post", "orderby" => "post__in", "order" => "ASC", "posts_per_page" => "50", "post__in" => array(344941, 344944, 344951) );it also crashes MySQL and returns a timeout error in the browser although it’s just 3 posts… I’m confused. Is there an endless loop in my code or something?
<?php /* Template Name: Popular Posts */ ?> <?php get_header(); ?> <? // $args = array( // 'posts_per_page' => '50', // 'meta_key'=>'views_total', // 'orderby'=>'meta_value_num', // 'order'=>'DESC' // ); $args = array( "post_type" => "post", "orderby" => "post__in", "order" => "ASC", "posts_per_page" => "50", "post__in" => array(344941, 344944, 344951) ); $my_query = new WP_Query( $args ); ?> <div class="wrapper section medium-padding"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $total_post_count = wp_count_posts(); $published_post_count = $total_post_count->publish; $total_pages = ceil( $published_post_count / $posts_per_page ); if ( "1" < $paged ) : ?> <div class="page-title section-inner"> <h5><?php printf( __('Page %s of %s', 'baskerville'), $paged, $my_query->max_num_pages ); ?></h5> </div> <div class="clear"></div> <?php endif; ?> <div class="content section-inner"> <?php if ($my_query->have_posts()) : ?> <div class="posts" id="Posts"> <?php while ($my_query->have_posts()) : the_post(); ?> <div class="post-container"> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php get_template_part( 'content', get_post_format() ); ?> </div> <!-- /post --> </div> <?php endwhile; ?> <?php endif; ?> </div> <!-- /posts --> <div id='infinite-view'></div> </div> <!-- /content --> <?php if ( $my_query->max_num_pages > 1 ) : ?> <div class="archive-nav section-inner"> <?php echo get_next_posts_link( '« ' . __('Older posts', 'baskerville')); ?> <?php echo get_previous_posts_link( __('Newer posts', 'baskerville') . ' »'); ?> <div class="clear"></div> </div> <!-- /post-nav archive-nav --> <?php endif; ?> <div class="clear"></div> </div> <!-- /wrapper --> <?php get_footer(); ?>edit: yep, it must be an error in the loop because if I remove everything after the query and only do a print_r($my_query) it executes in less than 1 second without any server load issues.
- This reply was modified 4 years, 2 months ago by Winston.
Forum: Plugins
In reply to: [WP Popular Posts] populate index with custom query by viewsI just tried that but it makes the CPU load spike to 100% until it completely crashes MySQL 🙁 maybe because I have around 100k posts
Forum: Plugins
In reply to: [WP Popular Posts] populate index with custom query by viewsHi, thanks for the reply
I edited my code but I still can’t get it to work 🙁
<?php /* Template Name: Popular Posts */ ?> <?php get_header(); ?> <? $args = array( 'posts_per_page' => '50', 'meta_key'=>'wpp_get_views', 'orderby'=>'meta_value_num', 'order'=>'DESC' ); $my_query = new WP_Query( $args ); ?> <div class="wrapper section medium-padding"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $total_post_count = wp_count_posts(); $published_post_count = $total_post_count->publish; $total_pages = ceil( $published_post_count / $posts_per_page ); if ( "1" < $paged ) : ?> <div class="page-title section-inner"> <h5><?php printf( __('Page %s of %s', 'baskerville'), $paged, $my_query->max_num_pages ); ?></h5> </div> <div class="clear"></div> <?php endif; ?> <div class="content section-inner"> <?php if ($my_query->have_posts()) : ?> <div class="posts" id="Posts"> <?php while ($my_query->have_posts()) : the_post(); ?> <div class="post-container"> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php get_template_part( 'content', get_post_format() ); ?> </div> <!-- /post --> </div> <?php endwhile; ?> <?php endif; ?> </div> <!-- /posts --> <div id='infinite-view'></div> </div> <!-- /content --> <?php if ( $my_query->max_num_pages > 1 ) : ?> <div class="archive-nav section-inner"> <?php echo get_next_posts_link( '« ' . __('Older posts', 'baskerville')); ?> <?php echo get_previous_posts_link( __('Newer posts', 'baskerville') . ' »'); ?> <div class="clear"></div> </div> <!-- /post-nav archive-nav --> <?php endif; ?> <div class="clear"></div> </div> <!-- /wrapper --> <?php get_footer(); ?>Forum: Plugins
In reply to: [AMP] %%footer%% text in last line of footerDisabling infinite scroll is not really a fix as it would cause even more inconvenience by disabling a main feature of the website 🙁
Hope Jetpack fix this asap… Meanwhile, is there a way to fix it myself by editing the PHP files?
I am a professional PHP developer. I followed the instructions provided by Jetpack here: https://jetpack.com/support/infinite-scroll/#theme
So it should be working, but there are some glitches even when following your exact instructions. How can I get some help if I’m already a developer?
I’m not asking you to fix the issue for me, I just want some hints what could be causing this.
Infinite Scroll will seamlessly integrate with your theme
This is a quote from Jetpack website.
Infinite Scroll is NOT seamlessly integrated as advertised. So please help me…