Closed (fixed)
Project:
Location
Version:
7.x-3.x-dev
Component:
Location_views
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2009 at 09:59 UTC
Updated:
13 Nov 2013 at 17:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
yesct commentedcan you change the sort order from country code to name? Also, try this again in the most recent dev version.
Comment #2
drupalok commentedsame here. how can i change the sort order to name? please help! :)
i am already using lates DEV version
thanks!!!
Comment #3
swolynski commentedAny resolution to this? I'm encountering the same problem. Thanks.
Comment #4
drupalok commented@ YesCT
What information do you need?
Thanks for this cool module
Comment #5
yesct commentedhmm. I see what you mean.
http://cathytheys.blip.tv/file/3439508
I guess we need someone to look at the code and figure out how to provide a way to sort by the name, not the code. I dont know if asking a views person to lend a hand would be helpful?
Maybe try going in to #drupal or #drupal-support and saying
"hi. I want to make by first patch. where do I look in the code to find out how a views sort order is set?" ...
making a patch
http://drupal.org/patch/create
irc
http://drupal.org/irc
usually people in irc like to help new people become the kind of people who can patch stuff. :)
Comment #6
philipz commentedThis is not Views problem but the way country names are stored in associative array in location.inc file.
If they were stored in database this would be possible to sort in views query but for now the only way is to write a module like this:
location_country_sorting.info
location_country_sorting.module
Comment #7
tomdisher commentedThis sorts the countries correctly but when using views according it will only show one result in the accordian per country, even if there are many results that should be found.
Comment #8
chrisbudy commentedIf you were to modify the key for the associative array that's being setup to be less generic you should get all results for each listed country.
We had a similar issue with sorting by province, and philipz solution here pointed us in the right direction.
http://www.heavyrobot.com/blog/provincestate-sorting-issues-views-and-lo...
Comment #9
mattcasey commentedI used #6 and #8 with a slight modification, maybe because we are using Content Profile: the result was in "node_users__location_country"
So, in the module file:
Comment #10
m2calabr commentedI have created a patch to 6.x-3.x and allows for countries to be truly sorted by country name in views properly. I had to create a new location_country table that I could join to in the SQL, so the SQL order by works correctly. The table will be create on a new install and if you run update.php. This patch also fixes a small issues where provinces in Japan that don't have abbreviations just numbers. These are not proper for mailing labels where you must the abbreviation, but must have the full name in those instances. So, if the province is just a number it is replaced with the full province name.
Comment #11
podarokbot recall
Comment #12
podarokbot
Comment #13
podarok#10 pushed to 6.x-3.x-dev
Thanks!!
This one has to be ported to 7.x-3.x-dev
Comment #14
podarok#10: locations-country-sort-380842-10.patch queued for re-testing.
Comment #16
jerenus commentedRerolled to 7.x-3.x-dev.
Comment #17
podarok#16: location-Views_sort_order_incorrect_for_Country_field-380842-16.patch queued for re-testing.
Comment #19
jerenus commented#16: location-Views_sort_order_incorrect_for_Country_field-380842-16.patch queued for re-testing.
Comment #21
jerenus commentedRetesting.
Comment #22
jerenus commentedWith out tab.
Comment #23
podarok#22 commited pushed to 7.x-3.x-dev
Thanks!
do
git pullfor next task-----------
There are a few nitpicks for release tagging
All debug code should be removed
looks like missed info strings...
Comment #24
jerenus commentedRemoved~ ^.^
Comment #25
podarok#24 commited
Comment #27
podarokThis patch introduced a bug #2119993: Error creating table in update 7302
Comment #28
podarokfixed