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.
Tagged: Exception
This topic contains 6 replies, has 2 voices.
Last updated by Waqas Bin Hasan 1 year, 3 months ago.
Assisted by: Waqas Bin Hasan.
Author | Posts |
---|---|
August 9, 2023 at 11:55 am #14175495 | |
Karin Werner Klement |
I changed the default language from Croatian to English: Different languages in directories ( (hidden link - English, hidden link - Croatian) and I encountered few problems. 1. In Microsoft Edge default language is still Croatian, in Google Chrome it is ok (when going to hidden link English page is displayed in Chrome but not in Edge) 2. hidden link was giving 404 - Page Not Found Error so I had to manually add 301 redirect rule to fix it) 3. When going to for instance page hidden link instead of redirecting to hidden link it redirects to English page hidden link. Thanks in advance |
August 10, 2023 at 9:17 am #14180675 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Hello Karin, Thank you for contacting the support. This looks like browser specific issue. Can you please clear all browser caches in Edge, as well as, in WPML -> Support -> Troubleshooting -> Clear WPML caches and recheck? I ‘ll also advise you to fix “WP Memory Limit” to at least 128MB while 256MB is recommended. See https://wpml.org/home/minimum-requirements/ for detailed information. You can set this in your wp-config.php file by adding following code: define( 'WP_MEMORY_LIMIT', '128M' ); define( 'WP_MAX_MEMORY_LIMIT', '256M' ); Remember to add these lines before the line where it says: Please let me know if this helps. Regards. |
August 10, 2023 at 12:36 pm #14182383 | |
Karin Werner Klement |
I did everything you suggested (cleared WPML cache, cleared browser cache, increased memory limit to 256) but it didn't fix the issue. In fact I see that the first problem is not browser related. In incognito mode in Google Chrome and on my mobile (also Google Chrome) I still get Croatian as default. End please also look at other problems listed in my support request (2. and 3.). Thanks |
August 11, 2023 at 7:08 am #14186109 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for the updates. Yes sure, I'll look into the other 2 also, apparently these all seem to be redirections related. May I ask for admin access to your website to check the issue in detail? You can create a separate admin user for this purpose, which can be deleted afterwards. Also provide detailed steps to reproduce the issue and links to pages in admin and on frontend. Remember to take full backup of your website and database before proceeding. However, a staging/test site is highly recommended, because I may need to try some changes/fixes on the site (including plugins & themes deactivation), which may cause conflicts with the live site otherwise. Please confirm it in your next reply or let me know if you do not agree with the mentioned. I've set your next reply as private to share this information safely. IMPORTANT: If you don't see the section for providing access information, do not write in the message box or the information may appear as public. See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security. |
August 16, 2023 at 10:24 am #14208485 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for the access. I am working on it and 'll get back to you accordingly. |
August 16, 2023 at 3:12 pm #14239085 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for your patience, I am still working on this and 'll get back to you as soon as possible. |
August 17, 2023 at 9:00 am #14244007 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for your patience and cooperation. I was able to check and observe the issues, please consider followings:
This was happening as you mentioned, but I simply deactivated all plugins except WPML and checked and there was no error. Then I re-activated all plugins and it seems to work fine. Perhaps there were some DB or redirection rules which were corrupted and this practice fixed it. I also cleared the caches in site and in browsers. Now English opens as default on hidden link, in all browsers.
Since you've changed the default language to English, you shouldn't use /en/ for English. The default language URL works without Language Directory. The 404 is expected, I removed all 301 rules to confirm this. However, it is up to you if you still want to reroute /en/ to default home page, you can keep it in place. In short, it isn't an issue but it is how it works.
Same rule applies here. Since you've changed default language to English and Contact page's English slug is "contact". If you try to hit it like hidden link (default language or English URL), WPML finds its correct English page and redirects to hidden link. If you want to redirect hidden link to its Croatian version (i.e. hidden link), you'll need to add a 301 redirect rule. This isn't also a problem. In short, there was only #1 problem which also is fixed by deactivating and reactivating plugins. Other 2 are not a problem but matter of understanding. If you are expecting your visitors to use older URLs, you can fix by the redirects. |
August 17, 2023 at 10:13 am #14244837 | |
Karin Werner Klement |
I just pushed site to live, and default language is displaying ok. |