Skip Navigation

[Resolved] Post Filter Not working

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by nedG 5 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#1197517
band-view.png

I have a CPT called Local Bands and DJs

It allows me to list all music bands and DJs for my area.

They have the following taxonomies and terms

TAXONOMY - TERMS
==================
MUSIC SOURCE - band, soloist, dj
MUSIC GENRE - Blues, RockNRoll, Disco... etc... (too many to list here)

A long time ago I set up a Post view that displayed all of the bands. It displayed only "bands" because I added a filter---> Music Sources slug in one of those set by the View shortcode attribute wpvmusicsource

See screenshot

I wanted visitors to be able to find what they wanted easily by using a text search and also byfilter by Music Genre. This worked great for a few years. However, recently it seems have broken.

I set up a test-page here.... hidden link

I think I set everything up properly... but for some reaosn the filters just don't seem to do anything. Additionally I had to add the FILTER and the RESULTS as separate shortcodes onto the page. If I added the entire View as a single shortcode, the Filter never appeared at all.

Very strange behavior

#1197722

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Ned

I looked at your test page and I noticed that there is a JS error in the browser console:

Uncaught SyntaxError: Unexpected token ;    from 8a2ac.js:113

I'm not sure what that JS file is because it seems like you are running something to minimise scripts, which obfuscates the name.

I can see in the browser dev tools that this particular script ends with the following lines, which may give you a clue as to what adds it:

jQuery(document).ready(function() {
    jQuery('form.material').materialForm();
});

JS errors on the page can affect other scripts, which may be why the filter is not working.

I would try to identify the plugin (or code you added?) that causes the error and temporarily disable it to see if that resolves the problem with the search filters.

If this was working and stopped working, the most likely cause is a conflict from something you subsequently added to the page, or arising from an update of something else on the page, so you may need to do a no-conflict test (disabling plugins, switching theme) to identify the source.

Do you only have the live site? No staging site for testing?

#1197820

I moved the page to a DRAFT... hidden link

I did some debug testing with plugins. Since I hadn't added any plugins and hadn't done many updates since it last worked, I didn't suspect a plugin conflict. I didn't find any. I noticed that the View filters were working on all other pages for other Views just fine.

I removed the checkmark from the View area that said... "Disable the wrapping DIV around the View"... and now it works. Looks like the TOOLSET wrapper caused the conflict with something else.

My issue is resolved now. Thank you!