Hi,

I just updated to the 1.0 release (as well as 7.26 core) and everything broke !

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.better_countries_custom_code' in 'field list': SELECT base.cid AS cid, base.iso2 AS iso2, base.iso3 AS iso3, base.name AS name, base.official_name AS official_name, base.numcode AS numcode, base.continent AS continent, base.enabled AS enabled, base.language AS language, base.better_countries_pin_city AS better_countries_pin_city, base.better_countries_pin_latitude AS better_countries_pin_latitude, base.better_countries_pin_longitude AS better_countries_pin_longitude, base.better_countries_custom_code AS better_countries_custom_code FROM {countries_country} base WHERE (base.iso2 IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => BE ) in EntityAPIController->query() (line 187 of /Library/WebServer/VirtualHosts/drupal/sites/all/modules/entity/includes/entity.controller.inc).

I have a similar error in Views or trying to manage Fields in Content Types...

Thanks to look into it.

Comments

gemp’s picture

Reverting to 1.0-beta3 was, fortunately, possible and is still working nicely.

BTW, thanks for this very nice module ^^

Jovean’s picture

Assigned: Unassigned » Jovean
Jovean’s picture

Just to check: did you run update.php (or drush updb)?

gemp’s picture

Not manually. It run normally at the end of the drush up performing db updates for other modules.

Jovean’s picture

The cause of this a missing update function between beta3 and 1.0.

I've added that, and it'll go into the next release, but the same can be accomplished by uninstalling beta3, downloading 1.0, and then enabling.

gemp’s picture

Apparently, you forgot to add it to the 1.1 release ^^

Here is my drush transcript :

w00g:2013 gemp$ drush pm-disable better_countries
The following extensions will be disabled: better_countries
Do you really want to continue? (y/n): y
better_countries was disabled successfully.  [ok]
w00g:2013 gemp$ drush pm-uninstall better_countries
The following modules will be uninstalled: better_countries
Do you really want to continue? (y/n): y
better_countries was successfully uninstalled.  [ok]
w00g:2013 gemp$ drush dl  better_countries-7.x-1.0
Install location /Library/WebServer/VirtualHosts/2013/sites/all/modules/better_countries already exists. Do you want to overwrite it? (y/n): y
Project better_countries (7.x-1.0) downloaded to  [success]
/Library/WebServer/VirtualHosts/2013/sites/all/modules/better_countries.
w00g:2013 gemp$ drush en better_countries
The following extensions will be enabled: better_countries
Do you really want to continue? (y/n): y
WD php: DatabaseSchemaObjectExistsException: Cannot add field countries_country.better_countries_pin_city: field  [error]
already exists. in DatabaseSchema_mysql->addField() (line 328 of
/Library/WebServer/VirtualHosts/2013/includes/database/mysql/schema.inc).
Cannot modify header information - headers already sent by (output started at  [warning]
/usr/local/Cellar/drush/5.9/libexec/includes/output.inc:37) bootstrap.inc:1217
DatabaseSchemaObjectExistsException: Cannot add field <em class="placeholder">countries_country</em>.<em class="placeholder">better_countries_pin_city</em>: field already exists. in DatabaseSchema_mysql->addField() (line 328 of /Library/WebServer/VirtualHosts/2013/includes/database/mysql/schema.inc).
Drush command terminated abnormally due to an unrecoverable error.  [error]