motor4ik
Forum Replies Created
-
And I also have a free version of AWS, maybe there is no such problem with Pro.
So this is this plugin version 8.5.1. The latest WPML version.
Also installed:
WPML Media Translation
WPML Multilingual & Multicurrency for WooCommerce
WPML Multilingual CMS
WPML Multilingual for CF7
WPML SEO
WPML String TranslationAll latest version.
Found a solution. The problem was that there was infinite recursion (looped function call) — PHP called the functions many times until it ran out of stack memory.
Namely:The loop looks like this:
AWS_Search->get_products() calls wc_get_product()
which creates a WC_Product_Bundle
which during get_bundled_items() → calls WP_Query → which again runs the search via AWS_SearchThis is a conflict between three plugins:
- Advanced Woo Search
- WooCommerce Product Bundles
- WPML / WooCommerce Multilingual
How to solve
Go to file /wp-content/plugins/advanced-woo-search/includes/class-aws-search.php
Search method
public function get_products( $posts_ids ) {and insert after {
// --- FIX: prevent infinite recursion with WPML + Product Bundles ---
static $aws_recursion_guard = false;
if ( $aws_recursion_guard ) {
return array(); // stop recursion
}
$aws_recursion_guard = true;
try {after return $products_array; insert
} finally {
$aws_recursion_guard = false;
}But this solution will disappear after the plugin update. I hope the developers will pay attention to this problem and fix it themselves in the next updates.
The problem only occurs when you click “Review all results” in the search results, i.e. on the search results page. Standard search does not cause such errors.
Great, it works on my dev server. I’ll try it in prod and report back.
Webpexpress works exactly as you described, and I’m satisfied with that. I was hoping your plugin would work the same way, but it returns jpeg. I would prefer avif with better quality instead of webp because webpexpress compresses images too much and I’m not satisfied with the quality, whereas your plugin allows for excellent quality adjustment with avif.
My opelitespeed server is running in a Docker container. I’ve been constantly restarting the container, even restarting my entire server, and nothing helped.
I sent it as you requested.
The issue is not with the browser but with caching. By default, WP does not cache pages for logged-in users. Some plugins allow temporary caching for logged-in users, but they send headers as if the users were logged in.
For example, the following header is sent for a logged-in user:cache-control: no-cache, must-revalidate, max-age=0, no-store, private
cf-cache-status: DYNAMICThe issue can be partially resolved by adding the code below to the
functions.phpfile. It sets a header for category pages and logged-in users that allows caching, but only in the user’s browser. Proxy servers (e.g., Cloudflare or other intermediary caches) will ignore this content.Пadd_action('send_headers', function () {
if (is_product_category() && is_user_logged_in()) {
header('Cache-Control: private, max-age=3600, stale-while-revalidate=86400');
}
});Please note that if dynamic content is generated for logged-in users, this solution may not work. However, it should work for most cases, so make sure to test it.