During the investigation, our team found that "Cloudflare" is mentioned as a Server header in the header list. Please check this screenshot: hidden link
The issue could also stem from Cloudflare caching the queries, which are then served from its cache. Could you please disable Cloudflare's caching feature? This will help us narrow down the problem more efficiently.
You can disable Cloudflare caching by logging in to the Cloudflare Portal.
Let me know when it is done. Looking forward to your response.
Unfortunately, it is very difficult to turn off Cloudflare caching on our end, as its part of WPEngine's advanced network that protects us from DDOS attacks.
Instead we had WPEngine create a cache exclusion for /lhjmq, so that site should not be cached at all.
Please let me know if that helps with your testing.
Thank you for the update. I hope that excluding the cache will be enough for for further testing. Rest assured, I'll reach out if I need anything more on your part.
I truly appreciate your patience and cooperation during this process.
After conducting a detailed examination, we identified the primary cause of the problem, which was linked to the "the7-tmp" cache group. By disabling the relevant code in the group definition, the menu issue didn't happen again. The testing was done ensuring the object cache is enabled.
Here are the steps we took:
- Accessed the `menu.php` file located in "wp-content/themes/dt-the7/inc/helpers/"
- Navigated to line 280 and modified the code from
We found a more resilient approach that doesn't involve altering the theme code. We added a PHP file named `fix_the_7_cache_menu.php` in the `/wp-content/mu-plugins` directory. In this file, we included the cache group that was causing problems in the non-persistent cache function group. The following is the code contained in the file:
The menu also works fine with this solution. If you're having the issue on any other site, you can simply download the file and upload it into the mu-plugins folder of the other site.
Let me know the update. We will be happy to help if you need further assistance in this matter.
Thanks for the update. We have done some testing as well. It seems your last plugin fix for the7-tmp non-persistent cache group already exists. Its in dt-the7/inc/theme-setup.php line 154. It seems the combination of your fix in the menu.php file of the same folder, and the other non-persistent cache plugin have solved this.
The problem is this is still just a workaround, as we could still have issues once the theme gets updated.
Will there be a possible permanent solution implemented for this in the future? Or should we be reaching out to the company that provided the theme (the7)?
Upon checking, I noticed that the cache group is already included in the non-persistent cache group function within the specified file. However, the non-persistent cache group operates more efficiently when it's added to the mu-plugin folder. Therefore, moving it to the mu-plugins folder helps to solve the issue. Since the cache group is located in the mu-plugins folder within a different file, it will remain in the non-persistent cache group even if you update the theme, as the theme update will not impact this file.
Just to let you know, our development team is actively working on resolving the issues we've identified with object caching. As part of this process, we recommend the plugin I mentioned in one of my previous messages(https://wpml.org/forums/topic/object-cache-changes-main-language-and-affects-menu/#post-15377738). If we can pinpoint the Cache group that's causing the problem, we suggest adding the cache group to the plugin, which should effectively address the issue.
We hope to resolve the issues with object caching in future updates. Until then, we recommend using the plugin solution. If you want, you can also notify the Theme support or developers about this issue, so they can explore more efficient ways to manage object caching.
I hope you can understand. Please feel free to let me know if you need further assistance in this matter. I will be happy to help.
Best regards,
Prosenjit
The topic ‘[Closed] Object Cache changes main language and affects menu’ is closed to new replies.