Skip Navigation

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

Problem:
If you're noticing that URL parameters like

?level=1

are missing when switching to a different language version of a page, this could lead to incorrect page versions being displayed.
Solution:
We recommend configuring the 'Preserve URL Arguments When Switching Languages' option in WPML → Languages. You should only add the parameter name (for example, 'level') without the question mark or the value. If you need to preserve multiple parameters, separate them with a comma. For detailed instructions, please see our guide on how to preserve URL arguments when switching languages.

If this solution doesn't seem relevant to your issue, please open a new support ticket with us.

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

Last updated by Waqas Bin Hasan 1 year, 7 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
November 1, 2023 at 11:28 am #14706815

benediktS-9

I have several pages with '?level=1' or with '?level=6' in the end of the URL
example:
hidden link
when I go to the german version I get this:
hidden link
With out '?level=1' in the end of the URL
So it is wrong page

How can I fix it?

November 2, 2023 at 6:41 am #14712591

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

As per my understanding, you may need to configure "Preserve URL Arguments When Switching Languages" in WPML → Languages.

Please see https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/preserve-url-arguments-when-switching-languages/ for details.

Regards.

November 2, 2023 at 11:45 am #14715895

benediktS-9

Thank you
Translation works, but flags steel redirects with out arguments
Example: ?level=1

November 2, 2023 at 1:17 pm #14717051

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates.

Have you tried that "Preserve URL Arguments When Switching Languages" in WPML → Languages? Because I just checked your site randomly and don't see it working for the pages links in menu.

Besides this, may I ask for the debug information of your website for an overview of your setup? See https://wpml.org/faq/provide-debug-information-faster-support/ for more information.

I've enabled the debug information section for your next reply.

November 2, 2023 at 5:13 pm #14719973

benediktS-9

ENG
hidden link
DE
hidden link

November 3, 2023 at 7:21 am #14722877

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

May I ask for admin access to your website to check the issue in detail? You can create a separate admin user for this purpose, which can be deleted afterwards.

Also provide detailed steps to reproduce the issue and links to pages in admin and on frontend.

Remember to take full backup of your website and database before proceeding. However, a staging/test site is highly recommended, because I may need to try some changes/fixes on the site (including plugins & themes deactivation), which may cause conflicts with the live site otherwise.

Please confirm it in your next reply or let me know if you do not agree with the mentioned.

I've set your next reply as private to share this information safely.

IMPORTANT: If you don't see the section for providing access information, do not write in the message box or the information may appear as public.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

November 3, 2023 at 11:59 am #14725539

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the access, I was able to login and fix the problem.

Please note that the way you had entered the parameter to preserve was wrong (?level=6). While the correct way is to just add parameter name (level) - see attached. If you want to preserve more parameters, separate each by a comma, as mentioned in the guide https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/preserve-url-arguments-when-switching-languages/.

I've corrected and tested on the frontend and it works just fine now. See this screen recording hidden link

Hope the issue has been fixed now.

wrong.jpg
correct.jpg