Skip Navigation

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

Problem:
The client wants to remove the last trailing slash in the URL, using the permalink structure /%postname% but it does not work.
Solution:
It could be a caching issue, clear all caches to fix this. But the URL should have the last trailing slash https://searchfacts.com/url-trailing-slash/

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

Last updated by luisT-15 1 year, 1 month ago.

Assisted by: Long Nguyen.

Author Posts
January 31, 2023 at 11:10 pm #12933665

luisT-15

Hello,

For some reason, my frontpage is not opening in a different language.

For example, this is the original language (English):
hidden link

I'm trying to open it in Portuguese language:
hidden link

Note: I have the Portuguese language hidden, so probably you can't see.

But I notice that If I change my permalinks:
From: /%postname%
To: /%postname%/

The URL hidden link opens fine.
But I don't want to change my permalinks, I want to remove the last /
Is it possible to open the hidden link ?

Thank you!

Best regards,
Tim

February 1, 2023 at 3:01 am #12934251

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi there,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

I've tested the permalink structure "/%postname%" without the last trailing slash and it works as well on my demo site. So please try to enable a minimal environment as below and see if it helps.
- Deactivate all non-WPML plugins
- Switch to a standard theme of WordPress
❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: 
https://wordpress.org/plugins/duplicator/

I also need more information on your site by sharing the debug info. If you don’t know how to share the debug info, please follow this article https://wpml.org/faq/provide-debug-information-faster-support/
Your next reply is enabled to share the debug info.

Look forward to your reply.
Thanks

February 1, 2023 at 9:33 am #12935641

luisT-15

Hello Long,

Thank you for your response.

Today, when I woke up, I tried to visit the frontpage in the Portuguese language again and it worked fine. I don't know if it was a cache problem, but I remember cleaning all cache yesterday. I'm using WP-Rocket which is 100% compatible with your plugin.

But today when I tried to translate a new page, I had the same problem, didn't work using the same slug, only works if I put a trailing slash at the end of the permalink structure.

Sending the debug information attached to this reply.

Thank you in advance.

February 1, 2023 at 9:57 am #12935785

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for the feedback.

Can you please follow the enable minimal environment as I said above and see if the issue persists or find a conflicting plugin?

If it does not help, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated. Your next reply is set to private to share the info.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: 
https://wordpress.org/plugins/duplicator/

Look forward to your reply.
Thanks

February 2, 2023 at 1:38 am #12942485

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for your feedback.

It could be a caching issue on your site. I've just re-saved the permalink settings and cleared WP Rocket cache and see the homepage in the PT language is not redirected to the EN language. I also create a new test page and it works correctly. Please check the info in the private reply below.

EN: /wpml-test-page-en/
PT: /pt-pt/wpml-test-page-pt/

Look forward to your reply.
Thanks

February 2, 2023 at 8:44 am #12944647

luisT-15

Hello Long,

Thank you for your response.

I noticed yesterday night, that the site was working fine with both options. I doubt that was a cache issue because when I deactivated all the plugins, I did the same for the plugin WP-Rocket as well and the problems continued.

But it seems that everything is working now.
Can I re-open this ticket if the problem returns?

Btw, I'm using the same slug for all languages, is it fine?
For example:

/postname-en/
/pt-pt/postname-en/

Thanks

February 2, 2023 at 8:56 am #12944733

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thanks for your feedback.

You can reply to this ticket in next few days or create a new ticket whenever needed. We are here to help.

Thanks.

February 2, 2023 at 8:57 am #12944739

luisT-15

Thank you for your fast response, Long.

Btw, I'm using the same slug for all languages, is it fine?
For example:

/postname-en/
/pt-pt/postname-en/

Thanks

February 2, 2023 at 9:34 am #12945135

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thanks for your feedback.

Yes, it's fine. Also, if you want to translate the page/post slug, please go to WPML > Settings > Translated documents options section > Page URL: Translate.
Please read more on the documentation https://wpml.org/documentation/getting-started-guide/translating-page-slugs/

Look forward to your reply.
Thanks

February 2, 2023 at 10:42 am #12946133
luisT-15

Thank you, Long.

Btw, when I translate a category or other page, WPML automatically adds pt-pt in front of the slug. Any way to stop this to happen? I have to edit the slug every time I translate something.

Thanks

New threads created by Long Nguyen and linked to this one are listed below:

https://wpml.org/forums/topic/split-problems-with-the-frontpage/

February 3, 2023 at 3:27 am #12952011

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for your feedback.

We can handle one issue per ticket only so if you have another issue, please create a new ticket for this. I can help you to split this ticket into another one and we can discuss the issue with the slug there.

If you see the main issue with the permalink is resolved, please mark this ticket as Resolved.

Look forward to your reply.
Thanks

February 3, 2023 at 9:00 am #12953677

luisT-15

Thank you, Long!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.