Skip Navigation

[Resolved] Toolset blocks 1.1.1 and view not working correctly in a content template

This support ticket is created 4 years, 2 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.

Our next available supporter will start replying to tickets in about 1.47 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 9 replies, has 2 voices.

Last updated by culturaI 4 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#1502225
view with block s 1.0.2.jpg
select.jpg
content template.jpg
view with block s 1.1.1.jpg

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!

#1502667

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/

#1504459

I am downloading the files, will update here if there is anything found.

#1504547

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.

#1507105

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.

#1508217

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

#1513657
relat.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

#1513851
filter-relatship.JPG

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.

#1515713

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"

#1522903

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

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.