Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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

Last updated by Pierre 4 years, 6 months ago.

Assigned support staff: Pierre.

Author Posts
June 29, 2015 at 6:09 pm #648719

Patrick

When I click the first link (Castia - Sisal), it redirects to the English page. I cannot access the French version no matter how I try. But, for example, the second link (Las Trinitarias - Sisal) works fine. The issue seems to be when the two URLs are exactly identical in French and English.

Here's the webage with the problem (French): www (dot) villegiainternational (dot) com (slash) location-de-maisons-et-villas (slash)

I have tried renaming the permalinks and changing the rewrite slug, but to no avail. This appears to be a bug with WPML. Let me know if you need more information.

June 30, 2015 at 8:00 am #649115

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+01:00)

Hello Patrick,

Welcome to WPML support forum. Thank you for such a detail description.

About "The issue seems to be when the two URLs are exactly identical in French and English". I'm not sure about that, in that case, Spanish page shouldn't work as well, but we will check this.

I imagine you have performed some of these steps, but could you please double check?

1. Go to Settings > Permalinks
- Re-save your settings

2. Provided that French translation still exists for this particular page, could you please add and -1 or any other suffix to this slug's page:
hidden link

3. Please check if this issue appears when
- All non WPML Plugins are disabled. It will tell us if there is an interaction issue with other plugin.
- Theme is set to a WordPress default like Twenty Fourteen. Its will tell us if there is an interaction issue with your theme.

I'll wait for your comments.
Andrés

June 30, 2015 at 12:03 pm #649382

Patrick

Thanks for the reply! Yes, the Spanish does work, and I noticed that. However French is the default language, as you can see by the fact that there is no /fr/.

1. Yes, I have tried re-saving permalinks, but to no avail.
2. Yes, the French translation exists, and when I add a suffix to the URL, it does work.
3. When I delete (move to a different directory) all the plugins except sitepress-multilingual-cms, the issue is still there.
3b. Unfortunately, I can't use Twenty Fourteen because my custom post type is defined in my custom theme. What else can I try?

June 30, 2015 at 12:36 pm #649420

Patrick

So I decided to do this:

1. Create a dev version of the site.
2. Activate Twenty-Fourteen, and only include the WPML plugin.
3. Add the function that I used to register custom post types into Twenty-Fourteen's functions.php file.
4. Make sure the .htaccess is clean.
5. Save permalinks.

This issue is still reproducible. I could PM you the access if you want (if that's possible)? Don't send me an email because the email adresse associated with this account may not be correct and I haven't gotten around to fixing it.

June 30, 2015 at 2:49 pm #649587

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+01:00)

I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

*Important: Be sure to backup your site and database first before you proceed!
You can use a plugin for this if you like. You can use the Duplicator plugin for this purpose.
See: http://wordpress.org/plugins/duplicator/

July 1, 2015 at 3:15 pm #650618

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+01:00)

Hello Patrick,

I could replicate this behaviour in your test site. As a temporary workaround I suggest you to change the slug of those problematic French custom post types.
I have escalated your case to our 2nd Tier support. They'll keep you update ass soon as there is any progress.

July 2, 2015 at 6:16 pm #651631

Pierre
Supporter

Languages: English (English ) French (Français ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello Patrick,

I am Pierre from 2nd tier support.

We manage to reproduce the issue. However, with WPML String translation installed and activated, this issue does not occurs any more. As you have a lifetime account, I would suggest you to follow the setps bellow:
1. Install and activate WPML String translation
2. Go to WPML > Theme and plugins localization and select "Translate by WPML"
3. Go to WPML > Translation options and enable "Translate custom posts slugs (via WPML String Translation) => See attachment
4. On the same page, in "Custom Post Types" section, enable "Use different slugs in different languages for Locations." For each language, set the slug as "location" => See attachment (replace "book" by "location")
5. Go to the posts containing the same slug in the default language and save it again

Let me know if this solves your issue.

Regards,
Pierre

July 2, 2015 at 8:34 pm #651676

Patrick

Are you planning on making a fix for this without requiring WPML String translation? I'm already using .po/.mo files for my translations, and it could take a while to re-do all those translations in WPML.

July 2, 2015 at 8:42 pm #651680

Pierre
Supporter

Languages: English (English ) French (Français ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

We will have to investigate on this issue so I can't tell now if it will be possible in a future release.
That's why I suggested to try with WPML String translation.

Actually, you can import the strings from your .mo file to WPML String translation. I think the strings should be automatically imported when you switch to "Translate by WPML". If the strings are missing, you can scan again the theme and plugin files (in WPML > Theme and plugins localization). Make sure to tick "Load translations if found in the .mo files. (it will not override existing translations)" before to scan the strings.

Let me know if this helps.

Regards,
Pierre

The topic ‘[Closed] WPML is randomly redirecting customs some post types to non-default language’ is closed to new replies.