[Resolved] Selecting language for translation redirects to different page
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing an issue where selecting the Spanish translation on a specific page redirects to the homepage instead of showing the Spanish translation. Additionally, there is confusion about why some links show as translated while others do not. Solution: 1. We recommend checking the page in an incognito window as it might display correctly. 2. The main menu, which includes parent menu items as Custom Links, needs translation. We advise translating the main menu and verifying the URLs. For guidance on translating menus, please refer to this documentation.
If this solution does not resolve your issue or seems outdated, 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.
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.
Background of the issue:
I am trying to select the Spanish translation on the page hidden link but it redirects to the homepage.
Symptoms:
When I select the Spanish translation, it redirects to the homepage instead of showing the Spanish translation.
Questions:
Why does selecting the Spanish translation redirect to the homepage?
How can I fix the redirection issue to display the correct translation?
Before your ticket is assigned to one of my colleagues, I'd like to guide you through some initial debugging steps to speed up the support process.
Could you please follow the below steps and see if this resolves the issue:
1. The current WP Memory Limit on your site is 40MB. The WP memory limit needs to be increased, it's different from PHP memory. PHP memory is fine but WordPress uses 40MB as default in your site. The minimum requirements for WPML are 128MB: https://wpml.org/home/minimum-requirements/
Please add this line to your wp-config.php file to increase WP memory, wp-config.php file is located in the root of your WP install:
You can add it anywhere in your file. I recommend placing it right before the following line:
/* That's all, stop editing! Happy blogging. */
2. We have recently released WPML 4.6.15, please take a backup of your site and update it to the latest version. You can update it from Plugins >> Add New page, click the Commercial tab, and then click the “Check for updates” button. Here is the screenshot for more details: https://wpml.org/wp-content/uploads/2020/04/wpml-force-plugin-update-1.png
4. If the secondary language page is published, please try to open the default language page in Edit mode and make sure it shows the pencil icon and not the plus(+) icon as you can see in the attached screenshot.
5. Resave permalinks from the Settings >> Permalinks page by pressing the Save Changes button.
6. Clear all sorts of cache from your site/server/CDN and see if this resolves the issue.
All of that was changed/addressed prior to submitting the ticket. Going to the translations management section doesn't work. I have to click on the plus icon next to the page for it to work correctly which seems to be a quicker and more consistent process.
Thanks for contacting WPML forums support. I'll be glad to help you today.
I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Preferably to a test site where the problem has been replicated.
Your answer will be private, meaning only you and I can access it.
❌ Please backup your database and website ❌
✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.
✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.
Why do some links show as translated and other don't? I'm currently not understanding how that relates to translating the main menu. The sub menu is already translated.
The parent menu items are regular pages, not custom links. They're pages that have already been translated including the page title. Do I still need to translate even though most links show translated? There are onlly a few that aren't.