WPML
Status
Resolved
Reported for
WPML Multilingual CMS 4.3.15
Resolved in
4.3.16

Overview of the issue

In some cases, it is possible that a link is converted to an ugly link.

e.g. /?p=1

This could happen if you have set the option for Default language in directory in WPML > Languages or if you use ”Display as translated” mode for the post type that the post belongs to.

Workaround

As a workaround, you can use our hook filter: “wpml_sl_blacklist_requests”

add_filter( 'wpml_sl_blacklist_requests', 'wpml_sl_blacklist_requests', 10, 2 );

function wpml_sl_blacklist_requests( $blacklist, $sitepress ) {
    $blacklist[] = 'first-post';
    $blacklist[] = 'second-post';
	return $blacklist;
}

Where 'first-post' and 'second-post' are permalinks for the affected posts.

All known issues →