Closed (fixed)
Project:
IP to Country
Version:
6.x-1.2
Component:
Miscellaneous
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2009 at 23:34 UTC
Updated:
29 Dec 2009 at 15:20 UTC
on the recent database there is an entry which says:
**"PALESTINIAN TERRITORY, OCCUPIED"**
Well, I need to remove the OCCUPIED. I opened the csv file in Notepad, did a search and replace of all the occurrences, re-updated the database, yet I am still getting the OCCUPIED on my comments section!!
How can I fix this situation? it can make a lot of people angry!
Comments
Comment #1
mrfelton commentedDid you clear your site's cache?
Comment #2
vako commentedYes, I did, it's also a while now and still the same.
Comment #3
mrfelton commentedThe country names are part of the countries_api module, not ip2cc, and they are stored in the 'countries_api_countries' table of your database. Re-importing the the ip2cc database will not change the country names - only the associations of IP addresses to countries. Easiest way to change this is to make this change directly in your countries_api_countries table:
UPDATE countries_api_countries SET name = 'PALESTINIAN TERRITORY', printable_name = 'Palestinian Territory' WHERE iso2 = 'PS';Comment #4
vako commentedThank you very much, it worked!
But it's weird that they have the name like that and it's weird that the new import is not letting us change the names in the cvs file.
Comment #5
vako commentedmrfelton, I used the SQL statement that you provided without analyzing it carefully and it seems that it missed couple of fields and replaced them with NUL:
Comment #6
mrfelton commented@Vako: The SQL only touched two fields. If those other fields have NULL, then that is how they were before you ran my query. And indeed, looking at the original data in the countries_api csv file confirms this:
PS,"PALESTINIAN TERRITORY, OCCUPIED","Palestinian Territory, Occupied",NULL,NULL
It's not that strange that doing a fresh import of ip2cc data doesn't alter the country names. As I said, the country names are provided by a completely different modules (countries_api). The ip2cc data import only deals with associations between IP address ranges and countries.
Comment #7
vako commentedThank you for the information and the solution. Everything is much more clearer now and issue corrected.