Saltar navegación

Open

Reported for: WPML SEO 2.1.0

Topic Tags: Compatibility

Overview of the issue

If you are using Rank Math SEO plugin and its Remove base option in conjunction with WPML’s Different domains per language setting, it may lead to excessive redirections, resulting in the ERR_TOO_MANY_REDIRECTS error.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open …/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-product-redirection.php file.
  • Look for line 139.
  • Replace:
    $link = trim( str_replace( Helper::get_home_url(), '', get_permalink() ), '/' );
    
  • With:
    // WPML -  Workaround for compsupp-7311
    $home_url = Helper::get_home_url(); 
    
    if ( 
    	Sitepress::get()->is_active() &&
    	$sitepress_settings['language_negotiation_type'] == 2
    ) {
    	$home_url = get_home_url();
    }
    
    $link = trim( str_replace( $home_url, '', get_permalink() ), '/' );
    

2 respuestas a “Rank Math SEO - "Remove Base" Option Causes Redirection Issues”

Dejar una respuesta

Por favor, mantente en el tema y sé respetuoso con los demás. Si necesitas ayuda con problemas no relacionados con esta publicación, usa nuestro Foro de Soporte para iniciar un chat o enviar un ticket.

Puedes usar estas etiquetas:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>