Hello!
I have:
Toolset Cpt: courses
Custom field Select: wpcf-tipo-di-corso
View that list courses filtered by wpcf-tipo-di-corso
inserted my view in a content template
Using toolset blocks all is working good.
Updating to blocks 1.1.1 my filter on frontend becomes blank
Reverting to 1.0.2 all is working good again (at the moment reverted to 1.0.2, site is on production)
Can i have a help to resolve? I'm not sure about how to proceed.
Thanks!
Hello,
The problem you mentioned above is abnormal, please check these:
1) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP/JS code snippets, and test again
2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
4) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
I am downloading the files, will update here if there is anything found.
I have tried with your duplicator package in my localhost. Here are detail steps, please correct me if there is anyting missing:
1) Edit the content template "Contenuto MotorinoV2 ricerca corso", there is only one post view in it: MotorinoV2-Alloggi,
2) click button "Edit in Classic editor", open and edit the post view "MotorinoV2-Alloggi":
hidden link
in section "Search and Pagination", there isn't any custom search form setting in it.
3) Switch to Toolset Blocks plugin version 1.0.2, download from:
https://toolset.com/download/toolset-blocks/#changelog
4) Open open and edit the post view "MotorinoV2-Alloggi" again, I see the same problem:
in section "Search and Pagination", there isn't any custom search form setting in it.
It seems that your custom search setting is lost or broken, please setup them again.
Working on it i think the problem is that i'm passing url parameters from main view "MotorinoV2 - Ricerca" to nested views:
Removing these filters and relative Query Filter :
[wpv-control-postmeta field="wpcf-anno-corso" url_param="wpv-wpcf-anno-corso"]
[wpv-control-postmeta field="wpcf-alloggio-selezione" url_param="wpv-wpcf-alloggio-selezione"]
i can filter again my view for wpcf-tipo-di-corso.
But i would like to use view "MotorinoV2 - Ricerca" to pass url parameters to 2 nested views ("motorinov2-prezzi" + "MotorinoV2-Alloggi") called in content template "Contenuto MotorinoV2 ricerca corso"
Not sure why in TSblocks 1.0.2 is working good but in 1.1 is not.
Please try these:
1) Activate Blocks plugin 1.1.1, you can download it here:
https://toolset.com/account/downloads/
2) Edit the post view "MotorinoV2 - Ricerca"
in section "Custom Search Settings", choose option " Let me choose individual settings manually", you will see the message:
Your custom field filters are using an internal "OR" kind of relationship, and dependant custom search for those filters needs "AND" relationships.
click button "Fix filters relationship" and enable option "Always show all values for inputs"
It works fine in my localhost, see screenshot filter-relatship.JPG
I tried:
1.click button "Fix filters relationship"
2. enable option "Always show all values for inputs"
but not working for me (i can't see your screenshot): if i select something my output is nothing (screen attached)
Also i want my filter relationship with OR operator (to correctly display my view output)
Please note that a snippet is running (in toolset settings) to manipulate views output if nothing is selected: (https://toolset.com/forums/topic/set-view-default-value-if-views-is-not-set/), please disable it.
I think you can see output (like me) only if nothing is selected
My screenshot is missing, I have uploaded it again.
And I have tried it with your duplictor package in my localhost, with below stesp:
1) Fix the filter setting:
https://toolset.com/forums/topic/toolset-blocks-1-1-1-and-view-not-working-correctly-in-a-content-template/#post-1508217
2) Activate the custom codes snippet
It works fine, I can see options of the select field "tipo-di-corso" in front-end home page
So there might other compatibility/server issue in your website, if you need more assistance for it, please provide a test site with the same problem, I need to test and debug in a live website.
Thanks for the details, I can log into your website, here are what I found:
The problem is this, in view "MotorinoV2 - Ricerca":
hidden link
- you are using view to query "Courses" posts,
- filter the view by custom fields of repeatible field group: wpcf-anno-corso, wpcf-alloggio-selezione
See your custom field settings:
hidden link
Since Toolset repeatible field group is based on one-to-many relationship, each item of repeatible field group is different post, there isn't custom field wpcf-anno-corso and wpcf-alloggio-selezioneso in "Courses" posts, so it conducst the problem you mentioned above:
if i select something my output is nothing
There is't such kind of built-in feature within Toolset Blocks plugin to achieve what you want.
You minght consider one of below options:
1) Edit post view "MotorinoV2 - Ricerca", in section "Query Filter" and section "Search and Pagination", remove filters for both field wpcf-anno-corso, wpcf-alloggio-selezione
So there will not be filters for: wpcf-anno-corso, wpcf-alloggio-selezione
2) Move the custom fields wpcf-anno-corso and wpcf-alloggio-selezione to post type "Courses"
Resolved simply inserting the view (only search form):
[wpv-form-view name="motorinov2-alloggi" target_id="self"]
in place of filter:
[wpv-control-postmeta field="wpcf-alloggio-selezione" url_param="wpv-wpcf-alloggio-selezione"]
removed also relative query filter.
Not yet resolved to filter by year (RFG child of courses) but is not urgent and i'll think about later.
Not sure about this change between toolset blocks 1.02 and 1.1.1 (seem more logic like version 1.02 for me) but i guess there is some reason.
Thanks