Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
When switching from the default language (English) to French using the language switcher, the URL initially works correctly. However, upon clicking the same French URL again, the '?lang=fr' parameter is lost from all menu item URLs, leading to a 404 error.
Solution:
1. **Update WPML Plugins**
Update the following plugins to their latest versions:
- WPML Multilingual CMS
- Advanced Custom Fields Multilingual
- WPML Multilingual & Multicurrency for WooCommerce
- WPML Media Translation
- WPML String Translation
Navigate to **Plugins → Add New Plugin**, click on the **Commercial tab**, and select **Check for updates**.
2. **Verify Language URL Format and Re-save Permalinks**
Go to **WPML → Languages**, ensure 'Language name added as a parameter' is selected, and click **Save**. Then, go to **Settings → Permalinks** and click **Save Changes**.
3. **Clear Caches**
Clear all caches, including any caching plugins and server-level caching.
4. **Verify WPML Site Registration and Acknowledge Site Movement**
Ensure the site is correctly registered with WPML and acknowledge any site movement notices.
5. **Check for Old Domain References and Clear Caches Again**
Use tools like Better Search Replace or WP Migrate DB to replace old domain references in the database. Always back up your database first.
6. **Run WPML Troubleshooting Tools**
Navigate to **WPML → Support → Troubleshooting** and use the cleanup options provided.
7. **Re-save Permalinks and Clear Caches Again**
Refresh your permalinks and clear all caches once more.

If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.

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 2 replies, has 0 voices.

Last updated by Kor 2 weeks, 4 days ago.

Assisted by: Kor.

Author Posts
February 23, 2026 at 1:17 pm #17843186

anthonyL-17

When we load a page in the default language (English) and switch to French using the language switcher, the URL works correctly the first time.

Example:

English URL:
hidden link

French URL (after switching language):
hidden link

On the first click, the French product category page loads correctly.

However, if we click the same French URL again:
hidden link

All menu item URLs lose the ?lang=fr parameter (they become:
hidden link
)

After this, the page returns a 404 error.

It appears that the ?lang=fr parameter is being removed from the menu links after the second click, which causes the issue

February 23, 2026 at 1:33 pm #17843313

Kor

Thanks for your patience. Here is the ticket, 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.

February 24, 2026 at 12:54 pm #17846719

Kor

Thanks for your reply. May I have your permission to temporarily deactivate plugins for testing purposes?

Additionally, please create a full backup and update all outdated WPML plugins here hidden link . Once these steps are completed, let me know and I will continue investigating this further for you.