Skip Navigation

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

Problem:
The client was experiencing an issue where clicking on the English flag to switch languages redirected to an incorrect URL, changing '/listing/' to '/product/', which resulted in an incorrect page layout. Additionally, there was a problem with listings not being displayed in both languages.
Solution:
1. We identified that some translated strings were breaking the URL slug.
2. We removed the problematic translated strings from the WPML String Translation.
3. We advised the client that if they wish to translate URL slugs, they should do so in WPML > Settings > Custom Post Type Translations, not in the string translations.
4. We split the ticket to address the issue of listings not displaying in both languages, which can be followed up here.

Please note that the solution provided might be irrelevant due to being outdated or not applicable to your case. If the issue persists, we recommend opening a new support ticket. We also 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 further assistance is needed, please contact us in the WPML support forum.

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

Last updated by Kor 8 months, 2 weeks ago.

Assisted by: Kor.

Author Posts
March 11, 2024 at 2:50 pm #15396111

ziga pipan

Hello. I think I have now translated everything fine.

My problem is this.
This is the SI listing ad
hidden link
when I click on ENGLISH flag, it says it's gonna take me here
hidden link
but instead it takes me here
hidden link

So the url should be /listing/ instead the url is /product/

Because of that it does not have the listing layout
Instead of this
hidden link

I see this
hidden link

how can I fix that?

March 12, 2024 at 9:31 am #15398241

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

I'm having trouble understanding the current situation. I'm uncertain whether the changes I made to the permalinks may have caused any issues on your website. However, I will make an effort to resolve this for you. Just to confirm, is this the desired format for the URL slugs?

Listings
English - hidden link
Slovenian - hidden link

Products
English - hidden link
Slovenian - hidden link

March 12, 2024 at 11:11 am #15398938

ziga pipan

Listings
Englihs - hidden link

Slovenian - hidden link
OK but it redirects me to - hidden link

Products I don't even need.

March 13, 2024 at 11:40 am #15403410

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

We apologize for the inconvenience, but in order to proceed with troubleshooting, we kindly request a site snapshot. Alternatively, with your permission, we can create a snapshot on our own.

For this purpose, we typically recommend using the free plugin "Duplicator." If you are already familiar with how Duplicator works ( https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.

To assist you further, please follow these instructions:
Watch the Duplicator instructions video: hidden link

Refer to the instructions provided by WPML on how to provide supporters a copy of your site: https://wpml.org/faq/provide-supporters-copy-site/

If the archive file exceeds 400MB in size, please utilize Duplicator's file filters to exclude the cache, wp-uploads directory, media, and archive files.

Once you have the archive file, please share the link with us. You can use services such as Google Drive, Dropbox, or similar platforms as the snapshot file will likely be large.

Please note that your next reply will be private, visible only to you and me. You can paste the link to the file there. Rest assured that once the issue is resolved, I will delete the local site.

March 14, 2024 at 6:35 pm #15411977

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

This is fixed now. Could you please check? hidden link

March 14, 2024 at 8:49 pm #15412429
ziga pipan

Hello,

thank you, everything seems to be working great! Would you mind telling me what you did, as I'm always looking to learn something new with WPML?

One other thing:

I added two new listings, one ona SI page and one on EN page.
hidden link
hidden link

Problem is, EN version shows me both listings (which is great)
hidden link

But SI version does not show me EN listing?
hidden link

In other words, "Test listing SI" is automaticaly translated to EN version and shows both flags, but "Test listing EN" is not automaticaly translated to SI, therefore showing only one flag. How can I make this work bothways?

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

https://wpml.org/forums/topic/listing-category-not-displaying-both-listings-from-different-languages/

March 15, 2024 at 8:02 am #15412899

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I've fixed the issue by removing some translated strings that are breaking the URL slug. hidden link

As for your new issue, I've split the ticket here https://wpml.org/forums/topic/listing-category-not-displaying-both-listings-from-different-languages/ so that we could follow up.

March 15, 2024 at 10:22 am #15413811

ziga pipan

thank you

how can a string break the URL slug and how to avoid this in the future?

March 15, 2024 at 1:34 pm #15414644

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I'm not sure if you translated the strings in the string translations. For example : listings to oglas. But when I checked, it was translated and it broke the URL permalinks. If you wish to translate the URL slugs, you need to do this in the WPML > Settings > Custom Post Type Translations.

So, I've corrected it for you and this is now fixed.

March 15, 2024 at 1:42 pm #15414653

ziga pipan

many thankx!