The location_handler_filter_eq function in locaiton_views.module does not handle the values and operators from the province select filter form correctly. These values are not processed, so the resulting query uses "location.province_select" in the WHERE clause instead of "location" and does not pass the form value through location_form2api, therefore using the 'us-DC' format used in the select element instead of the 'DC' format used in the db. The non functioning queries look like:
SELECT ... WHERE ... AND ... location.province_select = 'us-DC' ...
I think they should be something more like:
SELECT ... WHERE ... AND ... location.province = 'DC'
Using a flow-through in the switch statement and setting the "field" value of the filterinfo var to 'province' when it is equal to 'province_select' seems to fix this. Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| location_views.module.patch | 449 bytes | ethanw |
Comments
Comment #1
darkodev commentedThanks so much for posting this. Still didn't work for me, as it was still passing 'en-WA' for example.
These modifications to your patch worked for me:
Comment #2
bdragon commentedComment #3
bdragon commentedWontfix for 2.x.