Skip Navigation

[Resolved] FYI New Views code can break pagination/search

This support ticket is created 6 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.

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)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Luo Yang 6 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#1125420

So I am not sure why/how but before when I had a select field in a search in a view there was no API field indicating a "blank" default_label. So on front end the first choice is blank/nothing and the default_label is not used on back end. This has worked fine for the last 10+ versions.

After updating to the latest last night I noticed that the first line on the front end wasn't blank. This broke search obviously because you had to choose every field. Even more it broke pagination since pagination defaulted to the top choice on each field. I am not sure if this is the behavior you wanted in the update but you should warn people. Every view across all of our sites is basically non-working because of such a small but significant change.

#1125421

Just FYI if others come across this - just putting in the field default_label="-- Please Select -- " will fix this. Another note - "Edit Field" did not work when I highlighted my bracketed code in the view. So either you need to delete that and also the custom field filter.

Then you can add the field in and add the settings you want including default_label. However - and this is definitely a bug - if you chose to leave the default_label blank the field will not show up in your bracket and the field will break your search and pagination.

#1125885

Hello,

Yes, you are right, you can use attribute "default_label" to setup the default label for a select field.

For the question:
"Edit Field" did not work when I highlighted my bracketed code in the view

I have tried it in in a fresh wordpress installation, there isn't similar problem, in case it is a compatibility problem, please check these:
1) Make sure you are using the latest version of Toolset plugins
2) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2017
3) Create a fresh new view and test again
4) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out view URL and the field name, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/