I'm using the stock location/directory view and on countries for which there is no Province data ("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

See? There is no (obvious) way to keep drilling down.

I applied the patch provided in post #6 of http://drupal.org/node/351754 and still encounter this same behavior, but now I see that that was a report for a condition where filters were exposed. I have no exposed filters and see that my question is probably unrelated to the mentioned (and fixed) bug.

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.

Any ideas would be welcome. At present there is no way to find nodes with Singapore locations (and probably other countries as well—Singapore is just the one I found.)

Comments

smscotten’s picture

Category: support » bug
Priority: Normal » Minor
Status: Active » Needs review

Perhaps this was never answered because the answer was too obvious to others, but here is the modification that worked for me:

Configure Argument Location: Province
Change "Action to take if argument is not present" to "Provide default argument"
Set "Default argument type" to "fixed entry"
Set "Default argument" to "all" (or whatever is set as "Wildcard" above)

This could potentially be changed in location.views_default.inc (is a patch desirable?) but anyone that's already got the view will want to change the above settings in the view.

smscotten’s picture

Status: Needs review » Active

Nope, I'm an idiot. The above does not work. It forces the view of all cities always, even when there are provinces to choose.

Is the solution to change the "Unknown" link to "All"?

summit’s picture

Subscribing, greetings, Martijn

fletch11’s picture

good question...

pog21’s picture

I would also like to know this. On a production site where users add entries and often omit province or city, this renders a drill-down type search pretty useless. For the time being I have just had to disable it.

pcs305’s picture

Subscribing. I'm struggling with this too.

pog21’s picture

Just noticed that the Location Views project has been abandoned, so there probably won't be a fix for this in the near-future.