Support » Plugin: The SEO Framework » Problem with Woocommerce

  • Hi,
    I just installed your plugin and I am having a problem with Woocommerce. When a customer places an order, the order will go through but instaed of being directed to the “Thank you” page after clicking the Order-button, the customer gets directed to the 404 page not found. If I deactive your plugin, everything is working again…
    Is your plugin not compatible with Woocommerce?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi dammsugare,

    I’m using The Seo Framework on several WooCommerce websites without any issues. Unlike other similar plugins, it’s 100% compatible with WooCommerce.

    Which permalink structure are you using?

    Hi,
    for pages I am using …/mypage
    and for products
    …/product/myproduct

    I also noticed that when I deactivate SEO framework, Woocommerce still does not work properly, only if I deactivate Woo and reactivate it again. But before installing SEO, everything worked fine w/o any problems…

    Plugin Author Sybre Waaijer

    (@cybr)

    Hello there!

    Thanks @geetar for dropping by and confirming that this is not a common issue :).

    @dammsugare:
    Rewrite rules are super complex and most of all extremely fragile. Developers are still discussing best practices to this day. For this reason, one line of code out of place can and will mess things up; causing the issues you’re experiencing.

    I believe it’s fixed on deactivation of The SEO Framework (TSF) because TSF flushes its own rules (and everything with it) upon deactivation; so everything is as it was before activating the plugin.

    With that said, the exact same thing happens upon activating the plugin; however, the “sitemap” rewrite rule line will be added (if the option is available).
    If the “thank you” page does not show up after placing an order right after activating TSF, you can then be sure that TSF is the issue.

    Otherwise, this issue lies elsewhere; and it’s a real pain to figure out what it is (from my experience it’s quite random…). As you might have already noticed, a simple deactivation of a (most likely) unrelated plugin will “fix” the issue, if only temporarily.

    I wish you all the best of luck with finding the culprit.
    I truly understand the difficulty πŸ™

    Hi Sybre,
    thank you for replying. The really odd thing is that I am using your plugin on another site with EXACTLY the same theme and same plugins w/o a problem! What is going on here??

    Okay, no, my other site is NOT working either now. It was working and I tried resetting SEO to the default settings and now it is NOT working…

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @dammsugare,

    I’m not sure if it applies to your situation (as I have very little information), but could you try this solution, it’s supplied by one of the WooCommerce developers.

    I quote:


    Since you selected a base for your products called shop and you have a page called shop… that you use as parent of cart, checkout and my-account:

    Solutions:

    1. Change your products base, from shop to another thing
    2. Change your catalog slug
    3. Stop use your catalog page as parent from cart, checkout and my-account (my favorite solution for it)

    Now just pick one πŸ™‚

    Also, it might be worth noting to disable The SEO Framework on one site, and not on the other. From there, see if the issue still persists.
    I believe there might be another conflicting plugin or even a theme causing this, but who knows.

    Good luck!

    Hi Sybre,
    thank you so much.
    Unfortunately, the possible solutions you mentioned don’t apply in my case because I have no page “shop”. I only have one product, and it is displayed via the Woocommerce product shortcode on my homepage. So my cart and checkout page have the following urls: mysite.com/cart and mysite.com/checkout.
    I have already emailed my theme support and hoping to get an answer from them soon. I also noticed that in debug mode I am getting a notice on the 404 page: Notice: Trying to get property of non-object in /html/wordpress/wp-content/themes/mytheme/lib/template_hooks/page.php

    • This reply was modified 2 years, 4 months ago by  dammsugare.

    Okay, so more investigation done:
    It is really awkward: If SEO is activated, I need to deactivate Woocommerce and reactivate it, then it works. But if I then deactivate SEO and reactivate SEO again, it won’t work. I will then need to deactivate Woocommerce and reactivate it…but this isn’t what it is supposed to be like, is it?

    Hi Sybre,
    I got an answer from my theme support and they told me I need to translate the Woocommerce endpoints for “order-received”, “add-payment-options” etc in the Woocommerce settings. I did this and resaved the permalinks and now it is working. I have no idea why and I also have no idea why I need to translate these in the first place…

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi dammsugare,

    It is really awkward: If SEO is activated, I need to deactivate Woocommerce and reactivate it, then it works. But if I then deactivate SEO and reactivate SEO again, it won’t work.

    This is a classic example of a plugin or theme injecting rewrite rules at the wrong hook. Probably with added functionality to inject itself at the right time when WooCommerce is activated.

    This might be caused by a theme or plugin having added WooCommerce functionality.
    I will definitely check if the added flushing functionality of The SEO Framework is incorrect; but everything seems to look fine according to the standards (which is linked from the codex entry).

    That a translation needs to be present seems to be theme related (as it’s quite a direct solution), why that is I can’t explain as I do not know which theme you’re using.

    Let’s just hope for now everything will keep working :). Cheers!

    Sybre, my theme is Virtue Premium, a very well known theme. The theme support told me Woocommerce needs these endpoints to be translated if my website is using a different language(I have edited certain strings with Poedit and am using my own po files in a child theme). Otherwise Woocommerce is looking for endpoints strings and cannot find them.

    Best,
    dammsugare

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @dammsugare,

    I’ve just released TSF 2.8 with many improvements, including for this topic. I noticed there were some points where TSF didn’t fully comply to the standards. However, I must add that this would only conflict if another plugin or theme would do it completely wrong.

    Nevertheless, I hope this issue is now permanently resolved; at least from my part πŸ™‚ Cheers!

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