Closed (fixed)
Project:
Location
Version:
6.x-3.0
Component:
Location_views
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Dec 2008 at 09:36 UTC
Updated:
18 Feb 2009 at 01:59 UTC
Jump to comment: Most recent file
Comments
Comment #1
erantone commentedI also got this problem.
Actually this is a serious problem and you can not even filter by province, even when the filter province is set to some value.
Any hints ?
Thanks!
Comment #2
erantone commentedI also got this problem.
Actually this is a serious problem and you can not even filter by province, even when the filter province is set to some value.
Any hints ?
Thanks!
Comment #3
erantone commentedI found the bug:
I commented out //$value = array_keys($value); !!! ?
and added a if instruction: if (empty($this->value[0])) return;
on file location_handler_filter_location_province.inc in subdir. handlers.
Comment #4
carlogen commentedErantone,
I have applied your solution and it works.
Thanks
Comment #5
matt_c commentedThanks for sharing your solution erantone!
It saved us lots of time.
Comment #6
akahn commentedHere it is as a patch against HEAD. Could a maintainer please weigh in on if this is a good way to handle this bug?
Comment #7
bdragon commentedFixed, I hope.
http://drupal.org/cvs?commit=164846
http://drupal.org/cvs?commit=164847
A workaround in 3.0, by the way, is to uncheck "force single."
Comment #8
akahn commentedAwesome, thanks bdragon!
Comment #9
smscotten commentedIs this the same as the issue I'm running into? I'm using the stock location/directory view and on countries for which there is no Province data. When I click on "Singapore" for example I am offered only a link to the very same URL with the text "unknown." I'd like to have an easy way for my users to get from there to location/directory/sg/all without having to know to type in "all" in the address bar.
Example: http://www.penshops.info/location/directory/sg
I applied the patch provided in post #6 and still encounter this same behavior, so though it looks like the same issue, perhaps it is not?
I got onto a track of using a php validator to check location_get_provinces(), but even that can't take action other than pass or fail. I tried to update the argument from within the php validator, but that got me (for example) 'us/all' in the SQL. I could try hacking the URL and sending a redirection header from the php validator, but that seems like a highly inelegant solution.
If this is a different issue, I apologize.
Comment #11
bartclarkson commentedUnchecking "force single" worked for me, up to a point. You're in trouble if you are exposing more than one filter, such as City. In that case, you must apply the above patch, because otherwise the query that runs includes "...AND (location.province = '')..."
In my opinion, this patch or something like it definitely needs to go in the head.