Site logo

Archived topic

Complex Jquery menu problem

6 replies · Started by Max on July 20, 2018

Viewing posts 1–7 of 7

Tom

I am using a jQuery Ui sidebar accordion menu on my woo site.

It works perfectly in all locations with one exception:

If I do a search using the Woo search widget and the result it returns is "no products found" the menu does not function on that page.

If the search does return products they are displayed and the side bar menu works as expected.

If I inspect the no products found page in chrome/console I can see the following error message:

JQMIGRATE: Migrate is installed, version 1.4.1
Uncaught TypeError: jQuery(...).dcAccordion is not a function
    at HTMLDocument.<anonymous> (?s=trucks&post_type=product:59)
    at i (jquery.js?ver=1.12.4:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
    at Function.ready (jquery.js?ver=1.12.4:2)
    at HTMLDocument.K (jquery.js?ver=1.12.4:2)

The menu works as expected in all other (shop) archive-product template scenarios, categories and a seach that returns products. However if the search fires the no products found loop the menu is broken on the resulting page.

This one has me stumped. Any help you can provide is appreciated greatly.

What I cant understand is that an empty search, and a search that displays products, are both appearing in the same archive-product.php template. How can it be that the side bar menu functions differently using the same template?

Hi Max,

can you share a link to the site? You can edit your original post and use the Site URL field for privacy, then 'the smart' one can have a look

David

Thanks for your prompt reply.

I have just sorted this one out for myself.

No need to send it upstairs.

Hope you have a good weekend.

Kind Regards

Max

Thats great to hear. Any advice on what the issue was? I understand if you don't want to share lol

plugin script conflict

Aah, ok. Thanks for sharing.

This archived topic is closed to new replies.