[Support request] Woocommerce compatibility issue

Home Forums Support Woocommerce compatibility issue

  • This topic has 15 replies, 3 voices, and was last updated 1 month ago by Tom.
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #1387608
    Akhmed

    Hi there was an update for Woocommerce and the Woocommerce ajax filters plugin. After the update, it stopped working correctly, I wrote to support and they found out that the problem was in the theme.
    The problem is that when I select a filter on the “/ shop /” page, it loads endlessly.
    Everything works with the default Twenty Seventeen theme. You can see this problem at the staging copy /shop/ by selecting any filter without manually reloading the page, also at staging1.shadifamily.com everything is identical but with the Twenty Seventeen theme where everything works.

    I found an error but I don’t understand Ajax at all =
    Uncaught ReferenceError: http is not defined
    at showPage (VM122: 679)
    at Object.success (ajax_layered_nav.min.js: 1)
    at i (jquery.js: 2)
    at Object.fireWith [as resolveWith] (jquery.js: 2)
    at x (jquery.js: 4)
    at XMLHttpRequest.c (jquery.js: 4)

    #1387905
    David
    Staff
    Customer Support

    Hi there,

    thats odd.
    Does the issue persist if you disable the GP Premium plugin ?

    #1389319
    Akhmed

    Hi, yes
    Same error:
    Uncaught ReferenceError: http is not defined
    at showPage (VM122: 679)
    at Object.success (ajax_layered_nav.min.js: 1)
    at i (jquery.js: 2)
    at Object.fireWith [as resolveWith] (jquery.js: 2)
    at x (jquery.js: 4)
    at XMLHttpRequest.c (jquery.js: 4)

    #1390185
    David
    Staff
    Customer Support

    The Uncaught ReferenceError: http is not defined is related to what looks like a cached JS script.
    Can you clear any plugin and server caches and temporarily disable them.

    #1391058
    Akhmed

    Cleared the cache, disabled the caching plugin.
    The problem only appears after updating the plugin and using it with the Generatepress theme.

    But I noticed that if I enable the “Defer Render-blocking JS” function it loads the products but does not display the filters correctly (you can see this on the staging copy).

    #1391708
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    How can I see the error? I’m not seeing it on the page you linked to.

    Not sure why the theme would interfere with a plugin script, especially if it was working and broke when they updated their plugin. Is there a particular reason they think it’s the theme?

    #1392602
    Akhmed

    Hi, you can see the problem on non staging copy. I’m sure the problem is in the theme because if I change the theme to Twenty Seventeen everything works.

    I wrote to them in support, they also said that the problem is in the theme.

    `Uncaught ReferenceError: http is not defined
    at showPage (<anonymous>:4:2)
    at Object.success (ajax_layered_nav.min.js:1)
    at i (jquery.js:1)
    at Object.fireWith [as resolveWith] (jquery.js:1)
    at x (jquery.js:1)
    at XMLHttpRequest.c (jquery.js:1)

    #1393135
    Tom
    Lead Developer
    Lead Developer

    That’s strange that it works on Twenty Seventeen, but they will have to be more specific about where the conflict is happening with GeneratePress. http is being used in their javascript like this:

    function showPage(){
    	if (http.readyState == 4) {

    However, http isn’t being defined anywhere on the page (which is exactly what the error is saying in the Console).

    If they think it’s the theme, we’ll need a little more to go on to debug, especially as the code itself seems to be missing a var http = 'something'; somewhere.

    #1393203
    Akhmed

    Hi, sorry if I am repeating the same thing, I have no knowledge of java script at all. The only thing I understood is that when changing the theme to Twenty Seventeen, the plugin works, also if I enable “Defer Render-blocking JS” in the plugin cache settings, then it also partially work.

    #1393372
    Tom
    Lead Developer
    Lead Developer

    The only thing I can think of is that they’re defining http somewhere else in the code, but I’m just guessing.

    If the plugin that is outputting that code can be more specific, we can debug further. Right now it’s kind of like finding a needle in a haystack. It would be good to know where http is being defined.

    #1393411
    Akhmed

    Hi, what can I do to make it easier?

    I don’t know where “http” can be defined.

    #1394268
    Tom
    Lead Developer
    Lead Developer

    The plugin with the error should be able to help. If they can point us in the right direction, that would be great.

    If the error was pointing to our code, it would be easy to debug. However, the error is specifically pointing to their code (the function I mentioned above), which makes it pretty much impossible for us to debug.

    If they’re able to explain why/how the theme could cause this error in their code, it would help a lot.

    #1401124
    Akhmed

    Hi, I contacted Woocommerce support, they answered this
    ” It’s a conflict between “WooCommerce Advanced Ajax Layered Navigation” and the theme template – as I said, we can’t help troubleshoot the theme template issue

    My recommendation would be for them to compare the theme template with a working theme template like Twenty Nineteen and see what differences may be causing this. “

    #1401647
    Tom
    Lead Developer
    Lead Developer

    You’ll need to ask the WooCommerce Advanced Ajax Layered Navigation support team, as the error exists in their code. WooCommerce support itself won’t support third-party plugins/themes.

    Any info they can provide on why the theme would cause an error in their code would be very helpful.

    #1403796
    Akhmed

    Hi, I don’t really understand much what’s going on. If I change theme to Twenty Seventeen the plugin works, they say the problem is in GeneratePress

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.