Closed (outdated)
Project:
Location
Version:
6.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2007 at 05:19 UTC
Updated:
20 Jul 2016 at 11:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jordanlewin commentedI have this same issue, and nothing really to contribute here (yet) except that I can confirm it's an issue across more than just one install.
Comment #2
jordanlewin commentedI've done a little messing around in location_view.module to see if I can fix this, and here's a fix I've found. It seems that when multiple countries are not allowed (i.e. the site is set to one country by default) that the proper variable $country isn't being spit out in this snippet below, which is on line 784:
I've added a line here to check whether $country is set, as it's being used to get the proper province name for the argument, and if it's not, to set it to the site's default country:
This seems to be working on my site, which only has Canada as the country allowed, I haven't tested this on a site with multiple countries allowed. I assume this would still work there because even with multiple countries allowed there is still a default country that would get set here. If you want to specify a country's province here other than one in the default country, I assume it would need to be passed as another argument in the view, and then $country would already be set and it wouldn't be set here to the variable 'location_default_country'.
Comment #3
jordanlewin commentedSorry, this was all in location_views.module, not location_view.module.
Comment #4
jordanlewin commentedOne more note to add to this is that the arguments are case sensitive here (need to be uppercase), so if the province code argument is being input as lowercase in the URL, they need to be changed to uppercase for the view argument to work properly. I achieved this by inserting this piece of code into the "Argument Code" text box in the View UI:
It could also be done in the module itself which would probably be better by using this code:
Comment #5
gemini commentedThanks for your help jordanlewin! I'll try your fix tonight.
Comment #6
gemini commentedIt works! Thank you very much!
Comment #7
bdragon commentedComment #8
summit commentedHi,
Original issue still occurs on D6 latest .dev.
Also the view-fields country and province are not shown.
See attached picture for example.
This is a views output in views2 with location view and using the country france as argument, so the country france should be filled in within the views-field.
Country and province field are not shown, city field IS shown.
Thanks a lot in advance for going into this again!
Greetings,
Martijn
www.aanbiedingen-herfstvakantie.nl
Comment #9
summit commentedSorry, because of drupal-error, status not correct. Set it back to active because on D6 latest 3.dev same issue occurs.
Greetings,
Martijn
Comment #10
yesct commentedcould someone please create a patch ( http://drupal.org/patch/create ) against the most recent dev version? This will make it easier for more people to test the fix, and also for it to get committed. Thanks.
Comment #11
msypes commentedJoining in the fray:
I'm not finding that disallowing multiple countries is an issue. I'm getting something very like the original situation described by gemini. I have a "drill down" view of locations using %1 as country, two pages specifically for the US & Canada with a second argument for the state/province, and a third page for other countries which don't routinely use a province as part of the address.
My initial page provides a proper list of countries, and the US page a list of states. The "non-province" countries also function just fine. However, Canada's page displays a "broken" list of provinces: None of the province names are presented. I have Views set to display the number of records for each, and that shows up fine.
Assuming that didn't make any sense ;-) I should get something along the lines of:
Alberta (6)
British Columbia (2)
etc.
Instead I get
(6)
(2)
etc.
It seems as though Location isn't properly pulling out the province name from the array in location.ca.inc
Michael
Comment #12
yesct commentedlots of work went into the new official release, Please check to see if this is still a problem in the new release. If it is, reply with a new summary and set the status back to active.
Comment #13
Standard Machine commentedI believe that this is still an issue with the 3.1 version, I tried switching to the latest dev as well, but it didn't fix it.
I have the same problem as #11. The province names are blank when used as arguments that are supposed to printed in views.
This is true for page titles as well as the Views arguments summary output.
It is somehow related to the default country. /admin/settings/location/main
When I set it to the US, US states work; but Canadian provinces don't. When I set it to Canada, Canadian provinces work but then the US states don't. When I don't set a default country neither arguments work.
Is there some additional configuration needed for multiple countries to work with views arguments?
Comment #14
xpersonas commentedI'm having the same issue as #13
Comment #15
Slacky08 commentedSame issue here... adding a location field to a view won't show the province name, but adding the Location: Province will show the location code (not name).
I also use contemplate to theme my content nodes and I can access all the data (e.g. province name) fine, and I know the info on province is still in the database (can see it in phpMyAdmin), but it seems not to work when using the Location views field.
Any idea's how to fix this?
Comment #16
mrjeeves commentedSame issue on 3.1 here. looking into the code, i'm finding that the argument handler is not properly populating the $country which results in no name, even though the data "appears" to be there (based on the proper numeric output in the summary)
Comment #17
skulegirl commentedI had this problem too but finally figured it out... make sure that your country argument precedes your province argument. E.G., (%2, %1) => (province, country).
Comment #18
legolasboClosing old D6 issues as D6 is end of life