Problem: You are experiencing an issue where switching languages directly from the homepage results in an incorrect URL format, specifically adding an extra underscore (e.g., '.it__/?lang=en' instead of '.it/?lang=en'). This problem does not occur when switching languages from another page and then returning to the homepage. Solution: We recommend the following steps to resolve this issue: 1. Ensure all plugins, including the WPML suite, are updated to the latest versions. 2. Remove any unused plugins and clear all caches. 3. Refresh permalinks through Settings → Permalinks in your WordPress dashboard. 4. Re-test the homepage language switch. If these steps do not resolve the issue, it may require a manual inspection of the site and server URL rewrite rules, specifically for the homepage. Additionally, review the WPML language switcher settings and homepage permalink structure, and check for any custom functions or hardcoded URLs in the homepage template.
If the problem persists or the solution seems irrelevant due to being outdated or not applicable 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 needed, please open a new support ticket at WPML support forum for further assistance.
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.