- This topic has 15 replies, 3 voices, and was last updated 3 years, 8 months ago by Tom.
-
AuthorPosts
-
August 4, 2020 at 5:40 pm #1387608Akhmed
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)August 5, 2020 at 2:22 am #1387905DavidStaffCustomer SupportHi there,
thats odd.
Does the issue persist if you disable the GP Premium plugin ?August 6, 2020 at 5:18 am #1389319AkhmedHi, 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)August 6, 2020 at 1:49 pm #1390185DavidStaffCustomer SupportThe
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.August 7, 2020 at 3:37 am #1391058AkhmedCleared 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).
August 7, 2020 at 9:00 am #1391708TomLead DeveloperLead DeveloperHi 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?
August 8, 2020 at 2:47 am #1392602AkhmedHi, 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)August 8, 2020 at 9:46 am #1393135TomLead DeveloperLead DeveloperThat’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.August 8, 2020 at 11:10 am #1393203AkhmedHi, 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.
August 8, 2020 at 4:43 pm #1393372TomLead DeveloperLead DeveloperThe 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.August 8, 2020 at 6:26 pm #1393411AkhmedHi, what can I do to make it easier?
I don’t know where “http” can be defined.
August 9, 2020 at 10:27 am #1394268TomLead DeveloperLead DeveloperThe 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.
August 13, 2020 at 8:17 am #1401124AkhmedHi, 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 issueMy 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. “
August 13, 2020 at 2:20 pm #1401647TomLead DeveloperLead DeveloperYou’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.
August 15, 2020 at 4:33 am #1403796AkhmedHi, 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
-
AuthorPosts
- You must be logged in to reply to this topic.