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

mrfelton’s picture

Did you clear your site's cache?

vako’s picture

Yes, I did, it's also a while now and still the same.

mrfelton’s picture

The 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';

vako’s picture

Thank 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.

vako’s picture

mrfelton, 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:

PK  	PAK  	PAKISTAN  	Pakistan  	586
PW 	PLW 	PALAU 	Palau 	585
PS 	NUL 	PALESTINIAN TERRITORY 	Palestinian Territory 	NULL
PA 	PAN 	PANAMA 	Panama 	591
PG 	PNG 	PAPUA NEW GUINEA 	Papua New Guinea 	598
mrfelton’s picture

Status: Active » Fixed

@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.

vako’s picture

Thank you for the information and the solution. Everything is much more clearer now and issue corrected.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.