Resolved
Reported for: WPML Multilingual CMS 3.9.0
Resolved in: 3.9.1
Overview of the issue
In WPML 3.9.0 version, there is a problem in some cases when the site’s default language is not English, with the String Translation and the translation option for the custom post type slug. If you have a custom post type that has a translated slug you might encounter this problem.
WooCommerce Products can also be affected if the slug for Products is translated.
The issue results in a 404 Error Page to be shown or the product to not be available in that language.
Workaround
This issue will be resolved in the 3.9.1 version of WPML.
As a workaround, you can edit the slug-translation/class-wpml-rewrite-rule-filter.php file, found in the ../wp-content/plugins/wpml-string-translation/classes/ folder.
Replace the following code:
if ( $new_match != $match && $display_as_translated_mode )
with this one:
if ( $new_match != $match && ( $display_as_translated_mode || $current_language !== $default_language ) ) {
Afterward, you may have to visit Settings -> Permalinks and click Save Changes without making any changes.
this only causes the url to be shown as
example:
/en/?post_type={cpt}&p={pid}
instead of
/en/{slug}/{permalink}
This is not how it is supposed to work. Would you perhaps try and re-save the translation of the slug once more time? Maybe it would be best if you can open a new ticket in our forum so that we can investigate this case more in-depth.
re-save the slug transaltion and re-save the permalinks worked.
Glad to hear that it works now!
Thank you for getting back to us to let us know about this.
After the update 3.9 I did indeed suffer from this. The above solution works. Thanks for this.