Resolved
Reported for: WPML Multilingual CMS 3.3.6
Resolved in: 3.3.7
Overview of the issue
Posts that share the same title, generate the same URL instead of adding the -2 or -3 suffix to their permalink. As a result, the second and third posts with the same title are created with the same slug and are not accessible on the front-end.
For example, if you create three posts, all titled Hello World, they will all have a slug of hello-world.
Workaround
You need to go to:
/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-admin-post-actions.class.php
and change the row 111 from:
protected function get_save_post_lang( $post_id, $sitepress ) {
to:
public function get_save_post_lang( $post_id, $sitepress ) {
Then you need to go to:
/wp-content/plugins/sitepress-multilingual-cms/inc/url-handling/wpml-slug-filter.class.php
and add the following after the row 68:
$post_language = $post_language ? $post_language : $this->sitepress->post_translations()->get_save_post_lang( $post_id, $this->sitepress );
Hello.
This works only when post/page is pubished right away, doesn’t work for saving drafts.