Skip Navigation

[Resolved] Parametric filter dropdown fails when content contains an ampersand (&)

This support ticket is created 7 years, 7 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)

This topic contains 2 replies, has 2 voices.

Last updated by Luo Yang 7 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#428351

This is a bug report. I already worked around it on my end. But it seems pretty serious so I figured I should report it.

Try this:

1. Create a custom post type with a custom single line input field called "region"
2. Make some records that include a region with an ampersand, e.g. 'USA & Europe'
3. Create a parametric search which has a dropdown filter on "region" and which updates via ajax

Result: If you select 'USA & Europe' you will get 0 results.

For example, look at this screenshot:
hidden link

Originally I was using the region name "Northern CA: No. & E Counties" and I would get zero results. I re-imported my data and used the label "Northern CA: No. and E counties" and now I get the proper results.

Here's what my views filter code looks like:
hidden link

If you want to see how the actual filter behaves, it's here, though you won't be able to reproduce the bug because I removed all my regions with &'s in the names.

hidden link

#428524

Dear canton,

Thanks for the details, I have been able to duplicate same problem, and put it into our to-do list, our developers will take care of it.

#431076

It is now in our to-do list of Views 2.3, our developers are working on it. you can get the updated news by subscribing to our blog:
https://toolset.com/blog/

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