Skip Navigation

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

Problem:
The client is experiencing an issue where the
'News' page redirects to the English version when switching languages, despite
other pages working correctly with WPML.
Solution:

1. Ensure the 'Simple Main Menu' is translated into all required languages via WP-Admin -> Appearances -> Menus.
2. Use the WPML -> WP Menu Sync tool to synchronize the menu for the 'Simple Main Menu'. Only select the menu items for this section and apply changes.
3. If the 'News' menu item label needs to be different in other languages, use WPML -> String Translation to translate the 'News' string and then sync the menu again.
4. Check the menu in Elementor and ensure the correct menu is set based on the language.

If these steps do not resolve the issue or if the solution seems 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 further assistance is needed, 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 16 replies, has 3 voices.

Last updated by Marsel Nikolli 6 months, 3 weeks ago.

Assisted by: Marsel Nikolli.

Author Posts
April 12, 2024 at 11:54 am #15512761

exiliensoft

Tell us what you are trying to do?
Change slug of the page
Is there any documentation that you are following?
Yes
Is there a similar example that we can see?

What is the link to your site?
hidden link

April 12, 2024 at 2:14 pm #15513192

Laura
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hi,

thanks for contacting us.

What are you doing exactly to change the page slug? Please elaborate.

We'd also need your debug information https://wpml.org/faq/provide-debug-information-faster-support/

April 15, 2024 at 9:39 am #15518687

exiliensoft

I have added some languages ​​and if I click on the news page, it redirects to the English page.

April 15, 2024 at 11:58 am #15519832

Marsel Nikolli

Hi,

Thank you for contacting WPML Support, I will gladly help you.

I checked your website and I noticed that when you change the language the menu "News" doesn't change and it stays in English (the menu link as well).

1) Can you please check if the menu is translated correctly?

2) It might not be related to the issue, but according to your debug.info, the WP memory limit needs to be increased, WordPress uses 40Mb as default and the minimum requirements for WPML are 128 MB. (Kindly check this page: https://wpml.org/home/minimum-requirements/)

You can increase it by adding the following code in your wp-config.php file right before the line: /* That's all, stop editing! Happy publishing. */

/* Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M');

* Note: Please make sure you have a full backup of your website before making any updates/changes to your website.

Kind regards,
Marsel

April 16, 2024 at 12:24 pm #15525201

exiliensoft

I have tried this code in functions.php

and try increase size using server.

But issue is same.

Screenshot from 2024-04-16 17-53-47.png
Screenshot from 2024-04-16 17-51-59.png
April 16, 2024 at 1:42 pm #15525813

Marsel Nikolli

Hi,

The code I provided should be set to the wp-config.php file on the root folder of your website (as you did from what I see on the attached images).

Can you please tell me how you are translating the menu?

April 17, 2024 at 12:42 pm #15532194

exiliensoft

The news page is being translated correctly in some languages because I have added some languages to our news page from backend but when I visit frontend of any other language of new page it redirected it to English language.

April 17, 2024 at 1:52 pm #15532726

Marsel Nikolli

Hi,

Thank you for the update.

Would it be possible to check if the issue happens in a minimal setup, meaning:

- switch to a default WP theme
- keep active only WPML Plugins and must-have plugins
- disable all other plugins

After, check if the issue is still happening.

This would help check if the issue is related to any theme/plugin conflict.

Note: Please make sure you have a full backup (files & database) before trying anything on your website.

Let us know how it goes.

April 22, 2024 at 6:40 am #15548156

exiliensoft

But in all the other pages WPML work properly. There are more than 40 page.

We are facing only News page that is stuck in single language on english.

If we click in any language they will redirect to english language.

April 22, 2024 at 7:58 am #15548515

Marsel Nikolli

Hi,

I would need temporary access to your site's WP-admin to investigate this issue and understand it better. Please create an administrator user using any email address you prefer.

Please fully back up your site (files and database) and confirm it in your next reply.

Your next reply is set to private for you to provide the username and password details.

Thanks,
Marsel

April 23, 2024 at 11:55 am #15555767

Marsel Nikolli

Hi,

Thank you for the access, I was able to check you website and I noticed that the menu is not translated in all the languages and the link for "News" is a custom link.

Please go to WP-Admin -> Appearances -> Menus, and translate the menu "Simple Main Menu" into all the languages you are using on the website. I've checked and it is working correctly for the Indonesian version.

Let me know if you have more questions regarding this issue.

Regards,
Marsel

Screenshot 2024-04-23 135126.png
April 24, 2024 at 12:24 pm #15560712

exiliensoft

can you do this for me

April 24, 2024 at 12:46 pm #15560823

Marsel Nikolli

Hi,

* We kindly aim to provide support by demonstrating how you can effectively address issues and resolve them on your own. This approach helps you deal with similar issues that might arise in the future.

I would suggest checking the documentation here: https://wpml.org/documentation/getting-started-guide/translating-menus/#easy-customizable-wp-menus-sync

and try using the WPML -> WP Menu Sync tool (use it only for the "Simple Main Menu" section, check only the checkboxes for that section).

If you face any issues or if the process seems too complicated, let me know and I'll do it for you.

* Note: Please make sure you have a full backup of your website before making any updates/changes to your website.

Kind regards,
Marsel

April 24, 2024 at 1:05 pm #15560923

exiliensoft

I have try it but the problem not resolve.

The problem comes when we are change any language from like from english to french and then click home page and after we want to move news the language selection auto change from french to english but it will remain in french.

Actually this is the problem and after changing menus according i am getting same issue so please resolve it at your end.

Thanks

April 24, 2024 at 2:09 pm #15561087

Marsel Nikolli

Hi,

I checked and tested the menu in Italian following the procedure mentioned in my previous reply and as you can check it works fine. The only step that I would add is that you need to set the correct menu on the header template based on the language of the header.

* I've completed the menu sync for your menu following these steps:

1- go to WPML -> WP Menu Sync
2- select only the menu items for only one of the languages in the "Simple Main Menu" section (please check the attached image)
3- click the button "Apply changes" and wait for the process to finish
4- go and edit with Elementor the header (in the language you synched the menu items from) on the page: hidden link
5- in the Elementor editor, select the menu element, and on the element settings on the side select the respective menu (please check the attached image)

* As for now the news menu item is labeled "News" for all the languages, if you need to change it, you can do it from WPML -> String Translation, search for "News" string, and translate.

After you might need to run WP Menu Sync again for the "Simple Main Menu" section only for the menu item "News" so the change is applied (the changes that would be done show in different colors before you click the button "Sync")

Kind regards,
Marsel

Screenshot 2024-04-24 153351.png
Screenshot 2024-04-24 153020.png