emilycestmoi
Forum Replies Created
-
Forum: Plugins
In reply to: [AVIF, WebP Converter] Check for bulk images to convert during cronOh, ok. I was going to implement it and post the patch ?? Looks like I’ll need to do that for my own copy! Good luck. Thank you.
I get the same warning. Undefined array key “jp” and “sg” in class-wc-gateway-klarna-payments.php on line 230. Started happening a few versions back. No issues before that.
Forum: Plugins
In reply to: [WP Super Cache] Post request cached with late initCame here to report the same issue. Looking forward to the next release that fixes this. Thank you!
N/m I have extra DB error logging on which I believe overrode the wordpress error suppression. I believe all is fine if there are no other reports.
Forum: Plugins
In reply to: [AntiSpam for Contact Form 7] Little code bugSounds good. Thank you for all your work!
Forum: Plugins
In reply to: [AntiSpam for Contact Form 7] Configuration options does not expandHaha, yes that’s better, but why constrain it to a card at all?–it’s a non-standard approach? ??
Forum: Plugins
In reply to: [WP Super Cache] Check REQUEST_URI not $_GET when skipping supercacheHi! The default behavior is that if “Don’t cache pages with GET parameters” is unchecked then the plugin will use the fallback php file caching, not static file supercaching. The plugin is currently checking $_GET and preventing supercaching whether the “Don’t cache pages with GET parameters” is checked or not.
The correct way to avoid supercaching is to check REQUEST_URI as is done in my patch above. I have been using this patch now for 1 month on my live site with no issues at all, and it continues to successfully use static file supercaching on all 500000+ pages that are auto generated.
Forum: Plugins
In reply to: [WP Super Cache] Check REQUEST_URI not $_GET when skipping supercacheI couldn’t find a better plugin so I decided to fix this in wp supercache. This patch is applied to my live version on my site and is so far working fine and solves all problems while not changing any functionality:
Index: wp-content/plugins/wp-super-cache/wp-cache-phase2.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- wp-content/plugins/wp-super-cache/wp-cache-phase2.php (revision 3760) +++ wp-content/plugins/wp-super-cache/wp-cache-phase2.php (revision ) @@ -93,7 +93,7 @@ return false; } - if ( $wp_cache_no_cache_for_get && false == empty( $_GET ) ) { + if ( $wp_cache_no_cache_for_get && wp_cache_is_get_query() ) { wp_cache_debug( 'Non empty GET request. Caching disabled on settings page. ' . wpsc_dump_get_request(), 1 ); return false; } @@ -145,8 +145,8 @@ if ( false == file_exists( $file ) ) { wp_cache_debug( "No Super Cache file found for current URL: $file" ); return false; - } elseif ( false == empty( $_GET ) ) { - wp_cache_debug( 'GET array not empty. Cannot serve a supercache file. ' . wpsc_dump_get_request() ); + } elseif ( wp_cache_is_get_query() ) { + wp_cache_debug( 'Non empty GET request. Cannot serve a supercache file. ' . wpsc_dump_get_request() ); return false; } elseif ( wp_cache_get_cookies_values() != '' ) { wp_cache_debug( 'Cookies found. Cannot serve a supercache file. ' . wp_cache_get_cookies_values() ); @@ -1397,7 +1397,7 @@ return false; } - if ( ! empty( $_GET ) ) { + if ( wp_cache_is_get_query() ) { wp_cache_debug( 'Supercache caching disabled. Only using wp-cache. Non empty GET request. ' . wpsc_dump_get_request(), 5 ); $super_cache_enabled = false; } @@ -1878,7 +1878,7 @@ if ( defined( 'DONOTCACHEPAGE' ) ) { wp_cache_debug( 'DONOTCACHEPAGE defined. Caching disabled.', 2 ); $cache_this_page = false; - } elseif ( $wp_cache_no_cache_for_get && ! empty( $_GET ) ) { + } elseif ( $wp_cache_no_cache_for_get && wp_cache_is_get_query() ) { wp_cache_debug( 'Non empty GET request. Caching disabled on settings page. ' . wpsc_dump_get_request(), 1 ); $cache_this_page = false; } elseif ( $_SERVER["REQUEST_METHOD"] == 'POST' || !empty( $_POST ) || get_option( 'gzipcompression' ) ) { @@ -2107,7 +2107,7 @@ $dir = get_current_url_supercache_dir(); $supercachedir = $cache_path . 'supercache/' . preg_replace('/:.*$/', '', $home_url[ 'host' ]); - if ( ! empty( $_GET ) || isset( $wp_super_cache_query[ 'is_feed' ] ) || ( $super_cache_enabled == true && is_dir( substr( $supercachedir, 0, -1 ) . '.disabled' ) ) ) { + if ( wp_cache_is_get_query() || isset( $wp_super_cache_query[ 'is_feed' ] ) || ( $super_cache_enabled == true && is_dir( substr( $supercachedir, 0, -1 ) . '.disabled' ) ) ) { wp_cache_debug( 'Supercache disabled: GET or feed detected or disabled by config.', 2 ); $super_cache_enabled = false; } @@ -2122,7 +2122,7 @@ } if( $super_cache_enabled ) { - if ( wp_cache_get_cookies_values() == '' && empty( $_GET ) ) { + if ( wp_cache_get_cookies_values() == '' && !wp_cache_is_get_query() ) { wp_cache_debug( 'Anonymous user detected. Only creating Supercache file.', 3 ); $supercacheonly = true; } @@ -3301,6 +3301,17 @@ wp_cache_debug( 'GC Watcher: scheduled new gc cron.', 5 ); schedule_wp_gc(); } +} + +function wp_cache_is_get_query() { + static $is_get_query = null; + + if (null === $is_get_query) { + $request_uri = parse_url($_SERVER['REQUEST_URI']); + $is_get_query = $request_uri && !empty($request_uri['query']); + } + + return $is_get_query; } if ( ! function_exists( 'apache_request_headers' ) ) {
- This reply was modified 3 years ago by emilycestmoi.
I suspect you will need to rethink the design. Pages should use the same set of minified assets, that is how other plugins work.
Currently I have 3gb of minified assets from about 24hrs worth of visitors, this will grow substantially and is obviously not sustainable.
Unfortunately I will have to look for other solutions for my site. If you need any development assistance in terms of a redesign of the minify system, I can possibly lend a hand.