I am trying to: Select a category from the filter dropdown and then search to filter the results
Link to a page where the issue can be seen: hidden link
I expected to see: Select a Test Category from the dropdown filter. Then I should be able to press search and the search functions runs
Instead, I got: Whatever category is selected, the dropdown instantly reverts to the default 'All Categories' value before you even have time to perform the search.
This used to work as expected. We have recently upgraded to WordPress 5.0 and the latest Toolset plugins as well as updating all other plugins and the theme, and it seems one of these upgrades has caused the problem.
I was able to clearly see the issue. This is actually quite strange as i've never encountered this before.
Might I suggest that if you haven't tried this as yet is to temporarily disable the non-toolset plugins and check again.
If this doesn't work I would remove the filters from the view and save it, then re-add the filters back to the view and see if the issue still remains.
Looking forward to hearing from you with these tests.
I've tried disabling plugins to no avail. When I switch off the Fusion plugins the page breaks but the dropdown still does the same thing, so I think we can rule out the theme.
I've also tried removing the filters and re-adding them and it still does it.
What I have discovered is that if I change the "How do you want to update the results?" option to be "Full page refresh when visitors click on the search button" rather than "Full page refresh when visitors click on the search button with input values auto-updating" then it stops reverting to the default. However the list of categories in the dropdown is then incorrect (showing items with a count of 0). So that's not really a satisfactory solution as I want the fields to auto-update before and after selection. Clearly it's this auto-updating that's the source of the problem though.
And just to be really weird, there is one category which this issue doesn't occur on - "Malware Analysis Sandbox Testing" doesn't revert to default, whilst all the others do. Try it. Strange!
Not that I can think of really. There is a small amount of JS added via the Avada theme options which manipulates the page title on various pages. It's at Avada Theme Options > Advanced > Code Fields. And there are a few overridden functions in the functions.php of the active child-theme.
I think we're getting to the bottom of this. It was working for me, but I then spotted that the filter you had added wasn't exactly the same as mine and when I switched it back, the issue came back. So the issue is to do with the Taxonomy filter set by the URL parameter.
I had it set to "The service name is any of the values..." and when you recreated it it was set to "The service slug is any of the values...". As I say, if you switch it to Service Name, the issue comes back and if it's set to Service Slug, it goes away.
There's a couple of things to mention here then. Firstly, the reason I was using Name and not Slug (which I realise is a bit more robust as it doesn't include spaces) is because I use the URL parameter to append the page title using Javascript.
Secondly, this used to work, so the fact it doesn't any more suggests a code change now prevents it from working.
Obviously in the short term I can leave it set to Slug so that the search works, but I would like to see if it's possible to still use Name so that the page title reads as a name and not slug. Or if you can suggest another way I can access the selected Tax name for the page title, then I'm open to a different approach.
I tested this on a fresh install and it works fine.
How are you adding the Title to the page ? because what we can so is to get the slug that is being used and get the title from the slug by retrieving the taxonomy.
However I would need to know how you are getting this because I should be able to write a shortcode for this.
I've got a bit of javascript which is applied in the loop editor of the Toolset Test view. It checks the value of two hidden text values which I set in the loop based on the params. I then append it to the H1.entry-title on document load. Possibly not the best way of doing this, but I'm no JS expert.
You can include the following custom shortcode, in your active theme's "functions.php" file:
// shortcode to get the tax term info
add_shortcode('get_tax_title_by_slug', 'get_tax_title_by_slug_fn');
function get_tax_title_by_slug_fn($atts) {
$field = $atts['field'];
$value = $atts['value'];
$taxonomy = $atts['taxonomy'];
$result = get_term_by( $field, $value, $taxonomy );
if ($result)
{
return($result->name);
}
}