• Resolved wanderingexplorer

    (@wanderingexplorer)


    Hello @rankmath

    I have updated the plugin and now there is an issue with the URL for product category pages.

    Under “WP Admin->Rank Math->General Settings->Woocommerce” I have “Remove Category Base” = On

    My page URL used to be like this for product categories:
    https://www.mysite.com/product-category

    After I updated RankMath it now looks like this:
    https://www.mysite.com//product-category

    Please can you have one of the senior devs look into this ASAP as every time I update RankMath there seems to be another bug related to this feature :-(. Also I have read many support tickets about product categories…

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Rank Math SEO

    (@rankmath)

    Hello @wanderingexplorer

    Thank you for contacting the support and sorry for the issue you are facing.

    It is working fine for us. Here is a screencast:
    https://i.rankmath.com/Svd3ec

    We checked it on new installation with the TwentyTwenty theme and only Rank Math & WooCommerce plugin active.

    Assuming you are using the latest version of all the plugins and the themes (please update if not yet), it would seem like a conflict with one of the plugins or the theme you are using.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    Looking forward to helping you.

    Thread Starter wanderingexplorer

    (@wanderingexplorer)

    Hi @rankmath

    I have already done a plugin conflict test and the issue is with RankMath.

    To test further I created a fresh localhost WP installation.

    Please see my sreencast below:

    https://storyxpress.co/video/k9byvig0c19rao5jf

    Look at the bottom left corner of the video to see the URL as I hover over the product category menu link.

    Thank you

    Plugin Author Rank Math SEO

    (@rankmath)

    Hello @wanderingexplorer

    Can you please record a screencast of the backend like this one?
    https://i.rankmath.com/1rjQmQ

    It seems like the menu items or some other plugin is conflicting as it works as expected with WooCoomerce & Rank Math plugin.

    Looking forward to helping you. Thank you.

    Thread Starter wanderingexplorer

    (@wanderingexplorer)

    Hi @rankmath

    Not sure why you are having issues to replicate this issue. I installed a fresh WP install on localhost especially to test this for you.

    I have also switched to the TwentyTwenty theme now and the issue still remains.

    I created another screen cast as you requested:

    https://storyxpress.co/video/k9cdyftn2808j43sc

    In your change log it looks like you made updates to product category recently too so may I suggest you look at what changes were made in the previous versions to see where the error is coming from as this is a recent bug.

    Thread Starter wanderingexplorer

    (@wanderingexplorer)

    Hi @rankmath

    I just took a look at your change log and was able to narrow down the issue further.

    I believe I was using v1.0.41.2 when everything was working fine. After updating from v1.0.41.2 to v1.0.42.3 that’s when this bug showed up. I noticed you did a lot of work with the permalinks during this time and so I tested the permalinks.

    Please set your Custom Structure like mine: /blog/%postname%

    See my screenshot

    https://www.dropbox.com/s/bqgscuttz2my4dr/RankMathBug.png?dl=0

    Now I think you will see the double slash like in my screen cast.

    Hope you are now able to replicate this bug and squash it.

    Thank you.

    Thread Starter wanderingexplorer

    (@wanderingexplorer)

    Further update to the above. If you make the Custom Structure like this /blog/%postname%/ it works as expected (although there is now a trailing slash). But if you don’t want the trailing slash and remove it as in my case, RankMath adds the double slash.

    Are you able to replicate this bug now? Thank you for your support so far.

    Plugin Author Rank Math SEO

    (@rankmath)

    Hello @wanderingexplorer

    Thank you for helping in reproducing the error. As it was an edge case, we did not test it.

    It should be fixed in one of the upcoming updates.

    For now, please add the following code in your theme’s functions.php file to fix the issue:

    add_filter( 'term_link', function( $link, $term, $taxonomy ) {
    	if ( 'product_cat' !== $taxonomy ) {
    		return $link;
    	}
    	$permalink_structure  = wc_get_permalink_structure();
    	$category_base        = trailingslashit( $permalink_structure['category_rewrite_slug'] );
    	$link                 = str_replace( $category_base, '', $link );
    	return $link;
    }, 0, 3 );

    Hope that helps. Thank you.

    Plugin Author Rank Math SEO

    (@rankmath)

    Hello @hello

    Thank you for your patience. We sincerely appreciate that.

    We have released a Beta update that should fix the issue. Please follow these steps to update to the latest version and have the issue fixed:
    https://i.rankmath.com/TP6Xjk
    0. Take a complete backup of your site
    1. Go to Rank Math > Status & Tools > Version Control
    2. Enable the Beta Tester Option from Beta Opt-in Box
    4. Go to the Dashboard > Updates and update Rank Math to the latest beta version

    Hope that helps. If there’s anything, please let us know. We are here to assist.

    Take care!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Double slashes on product category pages’ is closed to new replies.