Roots Discourse

Has anyone had issues with Product Filters for WooCommerce?

The filters are showing on my shop page but I can’t click anything and I’m getting this console error Uncaught Error: Component prototype by entity key 'Project' not found. Switching to a default theme fixes it so I wasn’t sure if anyone has run into the same issue. This is a fairly fresh build so I haven’t done a whole lot of theme customization yet

A console error, so a JavaScript error? Are you using the Soil plugin with the Sage theme?
Any enqueued scripts that are missing or DOM changed?

1 Like

Yeah, it appears to coming from a plugin.min.js file. So it doesn’t appear to be anything specific with. WooCommerce, just the javascript that came with this plugin isn’t get enqueued. i am using the soil plugin. When I install a plugin do I need to enqueue it’s minified javascripts files in my theme?

When you temporarily disable the soil plugin, does the filter work then?
If so, it may be a bug with soil or missing configuration.

Yup, that fixed it. This is my current soil config

add_theme_support('soil', [
    'clean-up',
    'disable-asset-versioning',
    'disable-trackbacks',
    'js-to-footer',
    'nav-walker',
    'nice-search',
    'relative-urls'
]);

So this seems to be a plugin incompatiblity with soil - or missing soil configuration.

Try removing js-to-footer

1 Like

Yup that fixed it, thanks for the help!

I’m just going to combine the thread. Thanks to @alwaysblank and @strarsis for the fix.

This ended up being a conflict with the roots/soil plugin. Removing the js-to-footer from config fixed the conflict.

add_theme_support('soil', [
    'clean-up',
    'disable-asset-versioning',
    'disable-trackbacks',
    'js-to-footer', // REMOVE This line
    'nav-walker',
    'nice-search',
    'relative-urls'
]);