Query/filter taxonomy terms issues

As I have been playing around some more to solve my custom post type filtering via cutom taxonomy, I discovered some things that seem to me to be issues.

In order to investigate them outside of my current problem (which could come from reasons independent to Cwicly) I started a regular WP post with a simple query post block with a taxonomy query using WP category and the WP Url parameter terms.

Then I added a Button Single filter, using dynamic WP taxonomy as a source. In this filter, I added a paragraph with dynamic values filter/filter/Name.

Everything works, so Query ID and targets are well set.

Whatever field I would ask the taxonomy filter to use, it will pass the taxonomy slug to the URL.
So if in the Taxonomy Query I ask to use the filed Term_id and do the same in the taxonomy filter, I get no result when clicking the filters as they are passing the slug through the URL.

The new Query, using the the taxonomy term_id works as I can get the correct results by manually enter the term_id in the url.

What seems to be even more problematic is, if in the paragraph nested in the filter block, I change the dynamic value source/filter/filter to term_id, it shows in the backend and disappears in the frontend.
It seems that any filter field other than Name creates that same issue.

In your video tutorial about filtering you say to use slug in the taxonomy query. In the case I am working on, using custom post types and custom taxonomy, in effort to try to find the none responsive page issue while filtering, I started playing with the query using static values rather than dynamic ones.
I would not been able to query one specific taxonomy using the slug, but only using the term_id or term_taxonomy_id. That is how I discovered that issue, as this would fix the problem of the unresponsive page, but I was not able to use Cwicly filters in that case but was able to use manual url to get the filtered results.

Using slugs for filtering, while being handy on the URL side, can cause problems as they can be updated on the back end, which would break all the filtering in place, which wouldn’t happen if using the term_id.

I hope this is the path to solve the problem that have been keeping me stuck for quite a few days now…

Thank you in advance!
J

Hi @JuGa,

Thanks for taking the time to write this detailed report.
I can confirm the issues you bring up, please accept my apologies for the inconvenience caused and time lost on your side.

We will have a fix for these bugs in the next update, which should be later today.

Thanks for your patience!

Cheers,

1 Like

Thank you @Louis ! You guys rock as usual!
Really appreciate it, looking forward for the update which hopefully will help me moving forward on this project.

Cheers,

J

Hi @JuGa,

This should be addressed in 1.2.8.
If you still encounter problems or irregularities, I’d be grateful if you could let me know here.

Thanks for the report and your patience!

Thank you @Louis, really appreciate your quick feedback and solutions!

I just updated and checked, and I still have the same issue.

When I click on the filter, choosing Use Field either Term ID or Taxonomy Term ID,
the URL is still based on the slug, giving no result to my Query in which the Query Taxonomy is set to the Term ID, or Taxonomy Term ID.
The Query works (as it was already) which I can confirm by entering by hand the URL using the Term ID or Taxonomy Term ID.

I tried on both my Custom Post Type Archive Template filtering through Custom Taxonomy and a regular WP Post using a Query Block filtering regular WP Category and in both situations still get the same issue.

Maybe you found and fixed something else?
In the changelog you say
Dynamic Taxonomy filter fields should now be available throughout
Make Taxonomy Terms properties in Query Editor clearable

The behaviour I am describing is just the filter parameter Use Field ignored and use the static data slug instead.

Also, any idea when you would be able to get the Meta Query filtering available?

Thank you in advance, sorry it didn’t fix it, (unless you think I am misunderstanding something in the process…)

Best,

J

1 Like

Dear @Louis

so I have a good news,
now, I can filter the custom post type through custom taxonomy while setting the taxonomy query via the taxonomy slug, in that case, the filtering works now.

What persists is:

which seems to still be a bug

Next, as I already mentionned, and as you replied before as being planned, I would like to be able to filter using the Meta Query, especially while using ACF fileds.

Thank you again for all your work and responsiveness.

J

Hi @JuGa,

Thanks for the checking this out.
This does sound unusual as I’m able to filter using taxonomy IDs from the Filter block on all types. But, we have had a report from another user on our support.

Please bear with me while we look into this a bit more, apologies for the trouble!

EDIT: moving back to Bugs

Mhhh! :thinking: Strange…

So when you are filtering using Taxonomy ID from the filter block,
which Taxonomy Query field are you using?
And does the URL reflects it using the Taxonomy ID then?
Maybe if I can replicate the exact settings you are using it could help?

Let me describe again the full context (from a regular WP Post titled Test Query New
(not my custom post type/ custom taxonomy to make sure the issue doesn’t come from there)

Query
ID 158
Taxonomy Query
Taxonomy
Categories (post)
Terms
Source: Wordpress
Wordpress: URL Parameter
key: tester
Field
Term_id
Operator: IN

Then
FILTER
Query ID 158
Target tester
Filter Type: Single Button
Data Source: Dynamic
Data Type: Taxonomy
Show in selection Checked
Taxonomy
Categories (post)
Used Field
Term ID

Then the paragraph inside the filter
is set to Dynamic Content
Source Filter
Filter Name

On the front end when the
post is displayed I can see the result of the Query
but when any category is selected, the result of the Query is empty
and the URL is test-query-new/?tester=test2 (which is the Category slug)
but if I enter manually the URL test-query-new/?tester=8 then theQuery gives me the correct results

Hope than can help
I think I just repeated what I wrote before, but started from scratch again just in case I forgot something the previous time that could help you to understand where the issue could come from.

Thank you again, as always.

Hello @JuGa,

Thank you for your patience on this one.
When you have the time, could you possibly try again now that 1.2.8.1 is out, which brings a fix to the Frontend Rendering functions.

Thanks in advance.

1 Like

It works!!! :star_struck: :heart_eyes: :star_struck: :heart_eyes:
Thank you!!! :pray: :pray: :pray:

1 Like

Thanks for letting me know @JuGa, much appreciated!