Support » Plugin: 404 Solution » Compatibility with WooCommerce

  • Resolved ozzymuppet

    (@ozzymuppet)


    Howdy,

    I’ve recently migrated my website (and all ‘posts’) over to WooCommerce.

    This means all posts which used to be:
    /product-name-12345/

    Are now:
    /store/product-name-12345/

    And the post type is now “product”

    It appears 404S can’t find these new URLs unless some modification is done. Can you advise what I might modify (php, which files, etc.) to help it locate these?

    Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Aaron

    (@aaron13100)

    Hey ozzymuppet!

    I won’t get a chance to try to reproduce this issue until a bit later, but when I do get a chance the first thing I’ll do will be to turn on debug mode and look around in SpellChecker.php in the method getPermalinkUsingSlug().

    I’ll keep you updated.

    -Aaron

    Plugin Author Aaron

    (@aaron13100)

    Ozzymuppet,

    Unfortunately I haven’t been able to reproduce the issue. I installed WooCommerce and setup a product and then went to the URL of the product without the /product/ part and it forwarded correctly. i.e. http://localhost:8888/404solution/financial-consulting-product-1/ forwards to http://localhost:8888/404solution/product/financial-consulting-product-1/ for me.

    My products use a /product/ slug instead of /store/. Is there a setting I can change to make it match your setup?

    Will you post the debug log with debug turned on and when going to the URL that should redirect? Maybe there’s a message like “More than one post found with the slug, so no redirect was created.” or “No posts or pages matching slug.”

    thanks

    -Aaron

    Thanks for your help Aaron.

    Example here. Starts at 2017-08-08 09:11:26

    https://gist.github.com/ozzymuppet/a65a8a4eba52abf787c0c69b9c3883b2

    I think I can see the issue. 404 solution isn’t seeing any of my products.

    http://imgur.com/a/QMYsZ

    Potentially as I’ve set a custom base for woocommerce permalinks (in wordpress settings > permalinks), using “/pricetracker/” ?

    Plugin Author Aaron

    (@aaron13100)

    Hey. In the log file it shows /eachine_goggles_hd_1080p_hdmi_fpv_goggles-1094862 as the original link and /pricetracker/eachine-goggles-two-5-hd-1080p-hdmi-fpv-goggles-1094862 as the expected redirect destination (the first with underscores _ and the second with dashes – ) .

    It seems like that’s the issue. Please confirm and I’ll see what I can do about that.

    On the “Redirect to:” option you can’t scroll down on that dropdown list of pages to see other pages?

    thanks

    Correct. The old link is slightly different in that it has an extra word, and uses underscores instead of dashes. I thought surely they would be more than 10% similar.

    In the Redirect to: I cannot scroll down and see ANY products. I suspect this is the real problem. It’s not indexed my product posts for some reason. The only thing I can think around why is because I’m using /pricetracker/ as the base word instead of the default woocommerce /products/. This is a standard option in Woocommerce, not something I coded myself.

    Plugin Author Aaron

    (@aaron13100)

    Ozzymuppet, please update to version 1.8.2 and report back.

    The forwarding should work now from /eachine_goggles_hd_1080p_hdmi_fpv_goggles-1094862 to /pricetracker/eachine-goggles-two-5-hd-1080p-hdmi-fpv-goggles-1094862.

    On the other hand you still won’t see the products in the list of pages to forward to. That will take more time to fix. The products use a custom post type! Currently the plugin only supports post types of “page” or “post” so I’ll have to look through the code and see what other parts need to be updated. So far I’ve noticed the redirects table column “type” and the “redirect to:” dropdown list that you pointed out.

    Let me know on the forwarding.

    thanks

    It works! Great work mate.

    New log here. Mine is the ‘ozzymuppet’ user one, looks like Googlebot and Bing are busy hammering my site at the same time.

    https://gist.github.com/ozzymuppet/a65a8a4eba52abf787c0c69b9c3883b2

    Plugin Author Aaron

    (@aaron13100)

    I’m happy it’s working for you.

    Hey I think your “Minimum match score” setting might be a bit low in the options (the default is 90)? It seems weird that /mini_lathe_dc_24v/ would redirect to /1pc-mini-lamps-module-g426864/.

    cheers

    Yes, agreed, first thing I fixed up. Thanks.

    You should add ‘Woocommerce compatible’ in your plugin description. It’s definitely a huge help for online stores where you’re managing a lot of links which change and are updated often in the affiliate space like me. No more Errors in Google Search Console!

    Plugin Author Aaron

    (@aaron13100)

    Thanks for the tip ozzymuppet. I’ll add it to the bullet list!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Compatibility with WooCommerce’ is closed to new replies.