This thread is resolved. Here is a description of the problem and solution.
Problem:
Wrong Category Slug after language switching to secondary language
Solution:
Insert the custom PHP code below into your theme's functions.php file
add_filter('template_include', function($t){ wp_cache_flush(); return $t; }, 999);
Relevant Documentation:
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 15 replies, has 2 voices.
Last updated by frankG-4 1 year, 8 months ago.
Assisted by: Kor.
Author | Posts |
---|---|
August 3, 2022 at 1:06 pm #11794155 | |
frankG-4 |
Please visit the page. Go to NEWS, SPEECH AT WORKFLOWANALYTICA in English. Permalink is: hidden link, which is okay. Now switch to DE (German). Language Switcher is above the menu Button. Now Permalink is hidden link. Page Content is okay, but the Permalink must be .../news-de/... If you switch to German a second time the permalink is okay. This happens only to this Post, which is the latest after updating to 4.5.8. All other Posts are okay. |
August 4, 2022 at 3:44 am #11798963 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Hi there, Thanks for contacting WPML support. Could you navigate to WPML > Settings > Troubleshooting and click on the options listed below and see if it helps? IMPORTANT: Please, note, a backup is required for security reasons, and to avoid any data loss, you can use the https://wordpress.org/plugins/updraftplus/plugin for these backup needs. While checking your debug information, 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 you? Let me know how it goes. Thanks! Kor |
August 4, 2022 at 7:09 am #11799881 | |
frankG-4 |
Hi Kor, Unfortunately that didn't solve the Problem. Memory Limit is now 256MB. I created a Login for you. Where can I Paste the Credentials? Best Regards, Frank |
August 4, 2022 at 7:42 am #11800193 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Hi there, Thanks for your reply. I would need to take a closer look at your site. IMPORTANT: Please, note, a backup is required for security reasons, and to avoid any data loss, you can use the https://wordpress.org/plugins/updraftplus/plugin for these backup needs. Your following answer will be private, which means only you and I have access to it. ✙ I would need your permission to de-activate and re-activate Plugins and the Theme and to change configurations on the site if required. This is also a reason the backup is critical. Thanks! Kor |
August 4, 2022 at 10:18 am #11801679 | |
frankG-4 |
Hi Kor, I have created an Updraft Clone for you. Here you can better deactivate Plugins and do what you need. I can even send you the FTP Credentials. Please use this login: hidden link Credentials are the same as before. |
August 8, 2022 at 8:14 am #11820595 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Hi there, Thanks for your reply. Could you please restore the staging site? I'm not sure what I did but, it seems to work fine now. hidden link . I need to recheck and reapply some troubleshooting methods to see which one fixes it. So sorry for the inconvenience. Thanks! Kor |
August 8, 2022 at 2:21 pm #11823855 | |
frankG-4 |
Hi cor, I had to set up a new clone: hidden link. Credentials are the same. Can I switch to Private somewhere? If you need the FTP Settings... |
August 9, 2022 at 3:53 pm #11833993 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Hi there, Thanks for your reply. The issue seemed to be gone when I deactivated the "Elementor Pro" plugin. Not sure what's causing this and I would need a site snapshot to continue with the troubleshooting. Or can we have your permission to create a snapshot on our own? We usually recommend the free Plugin “Duplicator” for this purpose. If you already know how Duplicator works ( https://wordpress.org/plugins/duplicator/),please skip the following steps and just send me the archive file you downloaded. ★ Duplicator Instructions hidden link https://wpml.org/faq/provide-supporters-copy-site/ If the file is too large (more than 400M), please use the Duplicator file filters to remove the cache, the wp-uploads directory, the media, and the archive files. Send me the link to the archive file (you probably want to use Google Drive, Dropbox, or similar services, as the snapshot file will be quite big). Your next reply will be private, which means that only you and I will be able to see it and have access to it. You can paste the link to the file there. Once the problem is resolved I will delete the local site. Thanks! Kor |
August 10, 2022 at 7:28 am #11837973 | |
frankG-4 |
Hi Kor, can I delete the Updraft Clone now, as this costs some money every day? Best regards, Frank |
August 10, 2022 at 7:41 am #11838055 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Hi there, Sorry for the trouble. Could you leave it online for 2 more days? I'll have to forward that staging site to our 2nd Tier Support once I can confirm the issue on my local dev site using the copy that you've sent me. Thanks! Kor |
August 10, 2022 at 8:40 am #11838349 | |
frankG-4 |
Hi Kor, that is okay. Just to mention: The Duplicator Copy is from the Original-Site AcrossAndAhead.com. Best regards, Frank |
August 11, 2022 at 3:22 pm #11851527 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Hi there, Thanks for your patience. I'm able to replicate it on our sandbox site and I will forward this to our 2nd Tier Support for further investigation. Thanks! Kor |
August 12, 2022 at 4:05 pm #11858121 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Hi there, Thanks for your patience. We have a solution for this. Kindly insert the custom PHP code below into your theme's functions.php file and it will fix the issue you had there. add_filter('template_include', function($t){ wp_cache_flush(); return $t; }, 999); Let me know if it works for you. Thanks! Kor |
August 15, 2022 at 7:43 am #11865273 | |
frankG-4 |
Hi Kor, thanks for the code snippet. It really works. So you can close the ticket now. But one final question: Will the problem be solved in further versions of WPML, or do I need the code snipped in my functions all the time. I do not have a child theme and I am afraid to install one, because of all settings. I am afraid some will gt lost. So I set it in Astra Theme functions.php and habe to do that for every update. Thanks, Frank |
August 15, 2022 at 1:13 pm #11866733 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Hi there, Thanks for your reply. We've already forwarded this to our devs, and a fix will be included in our future updates. Thanks! Kor |