Skip Navigation

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

Problem:
The client is experiencing 404 errors on their website due to URLs that appear to be incorrectly encoded or truncated. This issue is particularly occurring with URLs containing non-Latin characters, such as Cyrillic for the Russian language.
Solution:
1. We recommend enabling URL Encoding for languages with non-Latin characters to ensure that URLs are processed correctly. To do this:
- Navigate to "WPML > Languages" in your WordPress admin dashboard.
- Click on "Edit Language".
- Find the "Encode URLs" option and select "Yes" for the Russian language.
- Save the changes.
2. If a specific URL is still showing a 404 error, check if there is an extra character like

%B

at the end of the URL. Removing this character should resolve the issue.
3. For URLs that are still problematic, use a URL decoder tool like https://www.urldecoder.org/ to check for any incorrect characters. Remove any incorrect characters found.

If these steps do not resolve the issue 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 problems persist, 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.

Tagged: 

This topic contains 12 replies, has 2 voices.

Last updated by Prosenjit Barman 2 months, 2 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
August 22, 2024 at 2:23 am #16092451

eamonnT

Background of the issue:
I am trying to track and fix a 404 error on my site hidden link. The specific URL causing the issue is hidden link.

Symptoms:
404 error

Questions:
How can I track why this is a 404 and fix it?

August 22, 2024 at 11:33 am #16094652

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're encountering. The URL you shared is encoded and seems to be incomplete or truncated, which might prevent the server from properly recognizing it, resulting in a 400 error. However, when decoded, the URL appears to work correctly and loads the page without any issues. Please refer to the attached screenshot for confirmation.

Could you please share where you've found that URL that throws the 400 error?

Since the Russian page slug contains Cyrillic characters, you can enable URL Encoding for the Russian language to ensure that URLs with non-Latin characters are processed correctly.

To enable URL encoding:

- Go to "WPML > Languages" in your WordPress admin dashboard and click on "Edit Language"
- Look for the option to "Encode URLs" option
- Select "Yes" from the dropdown for Russian language and save the changes.

This should help in preventing any issues related to non-Latin characters in your URLs.

Please check and let me know the update. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

Screenshot 2024-08-22 172655.png
August 26, 2024 at 4:48 am #16102277

eamonnT

I can not see an edit option. I am using clicky and that shows the broken url

edit option.gif
August 26, 2024 at 11:49 am #16104303

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi!

The "Edit Language" link should be available right below the language list. Please check this screenshot: hidden link

From there, you can edit the languages and update the Encode URL option for the Russian language.

Once the option is updated, you can check if you're still having the Broken link issue. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

August 27, 2024 at 4:50 am #16107240

eamonnT

okay found it thanks ..

How can I find out what actual page this page should be and how can i check now working ?

hidden link

ro.gif
August 27, 2024 at 4:51 am #16107255

eamonnT

also will thus thing ne also an issue with other languages....

August 27, 2024 at 9:19 am #16108562

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi!

It looks like an extra character is being added to the URL, causing it to display a 404 error. If you remove the `%B` from the end of the following URL, the Russian page should work properly.

- hidden link

It's possible that it was automatically generated during the translation process. But rest assured that while accessing the correct page, there is no 404 error.

However, if you have enabled the encode URL option, the URL for the Russian page should automatically be adjusted correctly for Future translations. For the existing page that's experiencing the issue, you can manually correct the slug by following these steps:

- Switch to the Russian language from your Dashboard using the Language Switcher in the top bar of the Admin area.
- Locate the Russian page that is showing the 404 error.
- Click on the Quick Edit link beneath the page title.
- Adjust the slug for the Russian page and save the changes.

I hope you can understand. If there is anything else you need help with, feel free to let me know. I will be happy to help.

Best regards,
Prosenjit

August 30, 2024 at 2:30 am #16122654

eamonnT

Thanks... Now that I know which page it is it looks okay as when i search for it it does not return 404.. hidden link

When I click on my page it works hidden link

Clicky might be causing the problem....?

BUt I am seeing other examples.... how can I find out the correct URL another example is for Jap language
hidden link

August 30, 2024 at 2:31 am #16122657

eamonnT

Should I also use encoding for Jap lang?

August 30, 2024 at 2:32 am #16122658

eamonnT

found another URL that is broken when reported in clicky but how do I find the correct URL ( same question )

hidden link

September 2, 2024 at 4:20 am #16129840

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

I'm glad to hear that the pages are loading correctly. The Clicky platform may be saving the URLs incorrectly, which is leading to a 404 error when trying to access the link. If you're not experiencing any issues in the search console or when accessing the page directly, then there's no need to worry about it. It would be best to reach out to Clicky support to discuss the issue with the links.

Regarding the Jap lang - if the language contains non-Latin characters, you'll need to set the URL encoding for that language as well. It is recommended to set the URL encoding for all the languages that contain the non-Latin characters.

To locate the correct URL, you can copy the link and use this tool to decode it: hidden link. After decoding, check for any incorrect characters in the URL. Remove any incorrect characters you find and then try accessing the URL again to reach the correct page.

I hope it helps. Feel free to let me know if you have any other questions or need clarification. I will be happy to help.

Best regards,
Prosenjit

September 2, 2024 at 12:34 pm #16131599

eamonnT

I placed this in decoder but dod not work

hidden link

So I can not check which page it is

September 3, 2024 at 5:29 am #16133891

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thank you for the update.

I used the decoder and was able to view the URL. You can check the decoded URL in this screenshot: hidden link

You'll notice that an ampersand symbol (%) is incorrectly being added at the end of the URL. Please remove that, and you should be able to access the correct page.

The WPML URL handler shouldn’t add such symbols. When you access the translated page, you’ll notice that there are no incorrect symbols in the URL. The Clicky platform may be incorrectly registering the URL with non-Latin characters, which could be causing this issue. It might be helpful to discuss this with the Clicky team, as they may be able to provide some insights regarding the links.

Let me know if there is anything else you need help with. I will be happy to assist.

Best regards,
Prosenjit