WPML

Overview of the Issue

You may experience improper redirections issues and potential 404 errors when Rank Math SEO plugin is installed, particularly with URLs containing special characters as double quotes.

Workaround

This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.

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 110.
  • Replace:
    $new_link = implode( '/', array_map( 'rawurlencode', explode( '/', ltrim( $new_link, '/' ) ) ) ); // encode everything but slashes.
  • With:
    if ((preg_match('/%[0-9A-Fa-f]{2}/', $new_link))) {
    	$new_link = rawurldecode($new_link);
    }
    
    $new_link = implode( '/', array_map( 'rawurlencode', explode( '/', ltrim( $new_link, '/' ) ) ) ); // encode everything but slashes.

All known issues

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.