Can’t create a filter
-
Hello,
I want to create a filter based on metadata in a collection. But no matter what metadata I choose (text, taxonomy…) it’s not working except for a numeric value. There is always the error “No options for this filtering.”
What am I doing wrong?
-
Hi @ioicut! We’re glad to hear that you are using Tainacan.
This could be due to a variety of causes. Just to make it clear, you have created items in the collection, with values set for the metadata (either text or taxonomy), then, when using the checkbox filter type, no option is displayed?
I would ask you to do a few things so we can figure out what is going on… First, try another filter type for these metadata (taginput, for example) and tell us if it is working.
Right, I created items with metadata.
When using taginput instead of a checklist Tainacan outputs “no options found”.
@ioicut Ok, thanks.
Second: Could you send us info from your browser console and network panel when you are loading the page (having the checkbox filter active)? If you don’t know how to do that, we have some info here: https://tainacan.github.io/tainacan-wiki/#/faq?id=how-do-i-see-network-or-browser-console-errors
-
This reply was modified 5 years, 9 months ago by
Mateus Machado Luna.
Yes, there is an error, that might be the cause…
Failed to load resource: the server responded with a status of 400 ()
/wp-json/tainacan/v2/metadata/88244?context=edit:1 Failed to load resource: the server responded with a status of 400 ()
and:
{"code":"rest_forbidden","message":"You are not authorized to perform this action.","data":{"status":401}}I do not have a
wp-jsondirectory on my webserver. Did I miss something during installation?Uhmm no,
wp-jsonrefers to the json api endpoint that WordPress uses. Just to know, which version of WP and Tainacan are you using? Did you check how things are at the Tainacan -> System Check page?Oh! this might be the reason. I am working on MariaDB 5.5. Can this be such a hughe issue?
I don’t think so… If it does not display some kind of error or warning message regarding this it should be ok.
I have two other trials:
First, update your permalink structure to “Post name” (a bit about this here)
Second, on the WP admin, go to Tools > Site health, and see if there is an optional PHP module missing.
@ioicut any luck?
No, unfortunately not.
I did both, the Permalink and the PHP modules, which are all installed, but no luck.
Maybe of interest: The filtering works on the level of collections. I can choose collections on the repository level
So for collection level filters it works, but not for repository ones? As for the error message, it seems to be something related to permissions, did you check if you have sufficient capabilities?
To help us reproduce the error, could you paste here a list of plugins/themes that you have active and possibly the versions of your WP and Tainacan?
Hey,
I solved it: I installed and activated ElasticPress without connecting it to a Elasticsearch instance. This somehow blocked the filter. After deactivating ElasticPress, the filters are working just fine.
Thanks for your help!
Hahhaha good to know, having elasticpress installed certainly changes how things work behind.
But you should not give up using it, we have some use cases with elastic search working. Probably should be fine once you set the connection to a proper ElasticPress instance.
Let us know if you have any problems related to that. For now, I’ll be closing this question 🙂
-
This reply was modified 5 years, 9 months ago by
The topic ‘Can’t create a filter’ is closed to new replies.