Forums › Forums › Search & Filter Pro › Post Meta Values With Spaces
- This topic has 5 replies, 2 voices, and was last updated 10 years, 5 months ago by Ross.
-
Anonymous(Private) June 2, 2014 at 3:34 pm #1114
It seems the search does not like spaces in the Post Meta values. I’m using a custom field plugin and when you add a field select with multiple options, if you don’t specifically enter a value, it creates one based off the label. When I add my values in Search Filter Pro, using the Auto-Suggest, it grabs the values with spaces fine – but when I search on the front-end it does not return any results.
Is there a way to have Search Filter Pro match a value with spaces in it? The funny thing is, if I edit the query in the URL after searching, and manually add a space in the URL, the results show up.
Example, manually adding a space between “KootenayRockies” makes it display results…
Search (no results):
/search/?_sfm_region=KootenayRockies&sf_ajax_timestamp=1401719498218Manually Edited (returns results):
/search/?_sfm_region=Kootenay Rockies&sf_ajax_timestamp=1401719498218Ross Moderator(Private) June 2, 2014 at 3:52 pm #1119Hey Highfilter
I was aware of this actually – it is not good practice to have meta values with spaces (labels should be used to display text with spaces and escape characters), but it doesn’t mean that users will not do this! (I was enforcing best practice, which I guess is not best practice…)
I’m updating the plugin today and I’ll be sure to include this as an fix as I know exactly where the problem lies ๐
Anonymous(Private) June 2, 2014 at 4:26 pm #1123I agree on best practice to not use spaces (in other CMS’s I have used it forces no spaces) but the fields can be client controlled and I guess if you don’t specify a value the plugin just adds it based on the label and doesn’t remove spaces or capitals.
Thanks for the update.
Ross Moderator(Private) June 3, 2014 at 1:27 am #1137Hey Highfilter
This should now be included in the latest 1.1.5 update – check your plugins dashboard for the update ๐
Ross Moderator(Private) June 3, 2014 at 1:25 pm #1159No worries ๐ Would really appreciate if you could leave us a review? Every little helps ๐
http://www.designsandcode.com/wordpress-plugins/search-filter-pro/reviews/#comment
-
AuthorPosts