The Countries Problem and How to Fix It
Clone this wiki locally
Important note about countries. Please read carefully!
The country mapping in lib/plugins/country_select/lib/country_select.rb was found to be wrong. E.g. Australia was originally mapped to AS, which is officially the ISO code for American Samoa. (This is just one example!) From this point (ca2fbaf2efc55a2c97c1c278806969ece7397881) on, it will be mapped to AU, the correct ISO code for Australia.
It is critical that you run the following rake task to fix your address data:
However, please note, this task should only ever be run ONCE! And it is strongly recommended that you BACKUP YOUR DATA before running this task.
To see the full list of countries that have changed, please see https://github.com/fatfreecrm/fat_free_crm/commit/ca2fbaf2efc55a2c97c1c278806969ece7397881
issue 214 also has more details of the fix.
Please note: if you run the rake task multiple times on the same database then you will mess up your existing address data. E.g. running once will map AS -> AU (Australia) and AU -> AT (Austria). If you run that again, it will map all Australian countries to Austria!! (...and so on for all the other mappings that have changed.)
This message is also included in a migration and checks whether it has run before. i.e. if Setting.have_run_country_migration has been set. If not, it asks you to run this rake task.