This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing incorrect URL redirection when switching languages using the dropdown flag on the front page of their multilingual website. The URLs are pointing to album pages instead of the homepage in different languages. Solution: We realized that the theme's Customizer was using a different frontpage setting. Ensure that the theme's Customizer settings for the front page are correctly configured. In this specific case the issue might be due to the front page being set to a 'Single Album' which could confuse URL redirection. Changing this setting to a static page like 'Homepage' might resolve the issue.
If these steps do not resolve the problem 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 issue persists, please open a new support ticket at WPML support forum for further assistance.
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.
Our next available supporter will start replying to tickets in about 11.63 hours from now. Thank you for your understanding.
<b>Background of the issue: </b>
In my site, I have 3 languages: Croatian (default) at hidden link, English at hidden link, and German at hidden link. The front page structure includes a photo album and a static page set in WP settings. I am using WPML for language switching.
<b>Symptoms: </b>
When I click the dropdown flag to change the language on the front page, the URL is incorrect. For example, for English, the URL is hidden link instead of hidden link. The same issue occurs for the default language.
<b>Questions: </b>
How can I fix the URL issue when switching languages using the dropdown flag on the front page?
I can see even the same issue when switching to German or Croatian.
hidden link hidden link
Revising the source code it looks as if the site is using hardcoded links, that are placed directly inside the theme instead of using the WPML Language Switcher.
Usually, this might be a topic for the theme developer. WPML's Custom Language Switcher needs to be included in the Header template of the theme by calling:
I enable Footer language switcher, but cannot see switcher in footer.
Also try add menu in Main menu and problem is still here.
Try Add widget in footer and url is still wrong
I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.
You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.
IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.
I may have to install a plugin called "All In One WP Migration" to make a copy of the website where I can investigate the issue further.
However, I would also be very grateful if you could provide a staging site or copy of the website from your server yourself for this purpose. This step would only be required if the issue is replicable on such a staging site.
If you have any questions about creating such a staging site, you can consult your hosting provider. Just take note that WPML should be registered on this site again.
If you are unable to provide such a copy of the site for testing, please let me know on this ticket.
The private response form looks like this: hidden link
Next time you reply, click "I still need assistance."
Video: hidden link
Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.
I have taken a local copy and I can confirm that the issue persists while testing the site only with the Apollo13 Framework Extensions plugin.
What is kind of odd, is that inside the theme's Customizer, the Frontpage is set to a "Single Album" and this seems to be the reason why WPML is confusing the URL:
If I change the setting, the redirection seems to work, for example when being on the Blog page.
This looks to me like an issue for the theme support.
As mentioned in my last comment, the issue is caused inside the Theme's Customizer when setting the Frontend setting.
I can see this issue even when WPML is disabled. The Frontpage is set to "Single Album" inside the Customizer (Theme Options) while WordPress uses a static page "Homepage".