Home›Support›English Support›[Resolved] Redis Cache WPML bug with Woocommerce breadcrumbs on fresh Wordpress install
[Resolved] Redis Cache WPML bug with Woocommerce breadcrumbs on fresh Wordpress install
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing an issue where category names were displayed in different languages on a WooCommerce site with Redis Cache enabled. This occurred when the product was translatable and set to 'use translation if available or fallback to default language', and the product did not have a translation.
Solution: We provided a workaround involving the insertion of custom PHP code into the theme's functions.php file. This code ensures that when Redis Cache is enabled, the correct language for product terms is used.
I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.
Also, I noticed that your “WP Memory Limit” PHP limit is below the required 128MB or recommended 256MB as described at: https://wpml.org/home/minimum-requirements/ . Could you please contact your hosting provider and ask them to increase this PHP value for yousc and also, ask them to update the MySQL version to 5.6+?
You are seeing the same as me (the right-most category in breadcrumbs is in wrong language).
It's not random, it only happens when:
1. redis cache is enabled
2. when product is translatable and "use translation if available or fallback to default language"
3. when product does not have translation
Also it's reversed when you flush object cache and view it first in English language.
Then it will show Kategooria1>Kategooria2>Category3
And when flushing cache and viewing Estonian first then it will show like:
Category1>Category2>Kategooria3
We apologize for the inconvenience, but in order to proceed with troubleshooting, we kindly request a site snapshot. Alternatively, with your permission, we can create a snapshot on our own.
For this purpose, we typically recommend using the free plugin "Duplicator." If you are already familiar with how Duplicator works ( https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.
To assist you further, please follow these instructions:
Watch the Duplicator instructions video: hidden link
If the archive file exceeds 400MB in size, please utilize Duplicator's file filters to exclude the cache, wp-uploads directory, media, and archive files.
Once you have the archive file, please share the link with us. You can use services such as Google Drive, Dropbox, or similar platforms as the snapshot file will likely be large.
Please note that your next reply will be private, visible only to you and me. You can paste the link to the file there. Rest assured that once the issue is resolved, I will delete the local site.
I'm sorry for the delay in getting back to you. I've successfully imported your website into my local development environment, but unfortunately, I couldn't the "Redis Object Cache" plugin to work as shown in the attached screenshot. Sorry, I'm not very familiar with the settings of this particular plugin.
To further investigate the issue and potentially escalate it if necessary, I've set up a sandbox site here hidden link . Could you please install the necessary plugins and attempt to replicate the problem there? This will help us better understand and address the issue.
Redis should be installed and configured on the server. It's usually not included with cheaper webhosts and I'm afraid I can't set it up on the sandbox site.
You can create redis server locally on any machine by following this guide: hidden link.
After you have redis server up and running you can configure wp-config.php in htdocs folder like I've done on staging.kylmakeskus.ee as seen on the attached screenshot.
Redis cache is very helpful at caching wordpress backend queries and making backend more faster and efficient and is crucial for larger sites.
Sorry, I don't think we have a redis configuration on the server. Can we work on your staging site directly? If you agree, I will forward your login information to our 2nd Tier Support for further investigation.
Adding posts fixed the problem on staging site, but live site somehow is still facing that issue..
I added the same wordpress theme to staging.kylmakeskus.ee website aswell so you can take a look. The problem is that the theme is using it's own custom breadcrumbs widget I think and that's why it's still not working correctly.