Skip Navigation

Resolved

Reported for: WPML SEO 2.0.1

Resolved in: WPML SEO 2.1.0

Overview of the issue

In some specific cases, the Yoast breadcrumb category may link to the wrong language. For example, if you enable the Directory for default language option in WPMLLanguagesLanguage URL format and you use a permalink structure like /%category%/%postname%/.

Workaround

Please make a full backup of your site before proceeding.

  1. Open the wp-content/plugins/wp-seo-multilingualclasses/Presentation/Hooks.php file
  2. Replace the following snippet:
     private static function getTermLink( $term, $fallback ) { return Maybe::fromNullable( get_term_link( $term ) ) ->filter( pipe( Logic::not(), 'is_wp_error' ) ) ->getOrElse( $fallback ); } 

    With this:

     private static function getTermLink( $term, $fallback ) { return Maybe::fromNullable( get_term_link( $term ) ) ->filter( pipe( 'is_wp_error', Logic::not() ) ) ->getOrElse( $fallback ); } 

4 Responses to “Yoast SEO - On breadcrumb, post category links to the wrong language”

    • Hey there,
      We don’t have an ETA yet, however we will update it here once we have any news.
      Thank you for your understanding.