• Resolved guilhermefr

    (@guilhermefr)


    Hello,

    I’ve been using permalinks customizer plugin for a while now on “post” taxonomy. I don’t know if the plugin is meant to be used like that, but in my case I use it to manually change the URL structure (post slug), leaving all other plugin settings to default values.

    It always worked as expected, but now I started to add WooCommerce products on the same site (different taxonomy), and I’m experiencing a strange behaviour: after manually changing the URL slug (with permalinks customizer) and publishing some Woocommerce products (the same process I do with post taxonomy), the URL of some products get “automatically” re-written to the same URL of another product.

    Example:
    Product 1: sitexyz.com/product_cat/product-1
    Product 2: sitexyz.com/product_cat/product-2
    Then, after a while (some hours), when I vistit Product 1, it changes to URL of Product 2, and I can’t visit the page of Product 1 anymore.

    Something is triggering an automatic permanent redirect from one product URL to another one, and I don’t even know where to start the debugging.

    I must also note that I have already added these 2 lines of code in my functions.php file of theme:
    add_filter( ‘permalinks_customizer_auto_created_redirects’, ‘__return_false’);
    add_filter( ‘permalinks_customizer_disable_redirects’, ‘__return_false’);

    Can someone help me on this issue?

    Thank you in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi @guilhermefr

    1. Try to clear cache (if have)
    2. There is nothing which works on the backend Like CRON in the Permalinks Customizer until or unless some other hook (any other plugin Like WooCommerce etc) triggering it something.

    Adding the following filters completely disable the redirects functionality of the plugin:

    
    add_filter( ‘permalinks_customizer_auto_created_redirects’, ‘__return_false’);
    add_filter( ‘permalinks_customizer_disable_redirects’, ‘__return_false’);
    

    Clear cache(if have), create test posts and try your scenario on it.

    Let me know your observations and output of it.

    Regards,
    Sami

    Same problem here, the snippet didnt work for me, its a mess.

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    @juato4 Please define what exactly your issue is and how long you are facing it?

    Thread Starter guilhermefr

    (@guilhermefr)

    Hi,

    Sorry for not giving any update on this issue. Here is what happened:

    1. I’ve checked under Permalinks Customizer > Redirects that there were indeed some links from product 1 URL to product 2 URL (I don’t know how they were created).

    2. After deleting these redirects, they were kept being “recreated” after a while (I don’t know how). I remember that I found a WooCommerce support item on their site stating that product URLs need to use one of their specific structures (like yourdomain.com/product/) in order not to cause any issue with permalinks, but I couldn’t find the link now

    3. So the solution for me was: Disabling Permalinks customizer plugin for “product” taxonomy and installing a plugin specific to deal with custom WooCommerce product permalinks structure.

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    @guilhermefr Is this happening for the Products or for Product Taxonomy? Secondly, is it happening for only the previous post/taxonomy or with the new one as well?

    What structure you have used?

    Regards,
    Sami

    Thread Starter guilhermefr

    (@guilhermefr)

    @sasiddiqui I thought “WooCommerce products” and “product taxonomy” meant actually the same thing? Because “WooCommerce products” is just the “product” taxonomy on WordPress, right?

    When I was trying to manually change the permalinks on WooCommerce products with Permalinks Customizer plugin, I used it on totally new product items (so there was no conversion from post taxonomy entries involved, if that’s what you mean).

    The structure I was trying to use was: mysite.com/product-category/product-name. But as previously explained, it seems that WooCommerce products permalinks own directives gets in conflict with Permalinks Customizer.

    Now I found the URL that made me choose desabling Permalinks Customizer for “product” taxonomy and install a specific plugin to deal with it: https://docs.woocommerce.com/document/removing-product-product-category-or-shop-from-the-urls/

    i think the problem comes after massive import modification of products. by csv file.

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    @juato4 That’s maybe the case else I am not able to generate the issue.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WooCommerce products issue: plugin is redirecting one product URL to another one’ is closed to new replies.