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

Last updated by Vincenzo 8 months, 2 weeks ago.

Assigned support staff: Vincenzo.

Author Posts
February 4, 2019 at 4:44 am #3156282

adamE-7

I am trying to add parameters to URLs for tracking purposes. Example: var1=Februar+Menu

Link to a page where the issue can be seen: hidden link

I expected to see the same content as displayed in the hidden link

Instead, I got 404 page.

February 5, 2019 at 2:54 pm #3162516

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello, thank you for contacting WPML Support!

1. From what I can see, the 404 error is happening in the original language.
- Is the issue reproducible when WPML is disabled?

2. Instead of the "+" character, can you please use a "-" or a "_" character?

3. If that's not the case, could you please elaborate a little more on the issue so I can better understand?

4. Can you please paste your WPML Debug information in the Debug information field?
- http://wpml.org/faq/provide-debug-information-faster-support/

Thank you

Related documentation:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/#preserving-url-parameters

February 7, 2019 at 2:11 am #3168101

adamE-7

Hi Vincenzo,

1. 404 is also happening in the translation page: hidden link and the issue is not encountered when WPML is disabled.

2. We changed '+' to '_' for now but we might need to use '+' in the future.

3. This is the current setup:
a. The site is a multisite.
b. For permalink, we use Custom Structure hidden link.
c. Given the example page, the slug is not the same in all languages. We use menu-mad-og-drikke in DA and food-and-drinks in EN. We tried to use the same slug for both pages and it worked, the pages work properly.

While debugging, we noticed that the matched rewrite rule for the page was changed. We looked further into the code and in the file sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php, _process_generic_text() somehow changes the the post type of page into post. We tried to skip the process inside the for loop if language is not the current language.

February 7, 2019 at 9:54 am #3169412

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hi there,

thank you for the further details.

Before proceeding with the debug, can you please test the newly released WPML 4.2 version?
You can download the latest released versions here:
- https://wpml.org/account/downloads/

❌ Before proceeding please make a full website backup! ❌

If the issue is still there, could you please replicate the problem in this specifically created test installation?
You can access it by clicking on this One Click Login link:
hidden link

You will find your username and password in the site's Dashboard.

Please configure WPML and install/activate only the plugins and/or the theme required to reproduce the issue.

After that, please repeat the steps to reproduce the issue on this test install too.

It would be very useful if you could send me a detailed list of the steps used to replicate the problem.

Thank you

The topic ‘[Closed] Pages with translated slugs returns 404 when tracking parameters contains spaces’ is closed to new replies.