Using the most current 'i18n 7.x-1.x-dev (2011-Feb-20)' on a basic Drupal7 test site, I get the following error on the frontpage when activating the submodule 'Multilingual Select':

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.language' in 'where clause': SELECT base.tid AS tid, base.vid AS vid, base.name AS name, base.description AS description, base.format AS format, base.weight AS weight, v.machine_name AS vocabulary_machine_name FROM {taxonomy_term_data} base INNER JOIN {taxonomy_vocabulary} v ON base.vid = v.vid WHERE (base.tid IN (:db_condition_placeholder_0)) AND (base.language IN (:db_condition_placeholder_1, :db_condition_placeholder_2)) ; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => de [:db_condition_placeholder_2] => und ) in DrupalDefaultEntityController->load() (line 196 of /var/www/site_foo/includes/entity.inc).

After that nothing works any longer. The site is completely gone. Thanx for fixing!

Comments

Blooniverse’s picture

Priority: Critical » Major

... really strange, similarily as described in #1070580: 2 errors (undefined index, call_user_func_array) comment#2, this doesn't happen on my real Drupal development site with ~80 additional/optional modules!

Jose Reyero’s picture

Status: Active » Closed (fixed)

If updating from an alpha version, you need to reinstall the module (or manually create the fields).

Blooniverse’s picture

Thank you, Jose! I've upgraded now from dev to beta1 - things work quite fine now!!!

Jose Reyero’s picture

Status: Closed (fixed) » Fixed
GStegemann’s picture

I re-installed all the modules, but still get errors:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.i18n_tsid' in 'field list': SELECT base.tid AS tid, base.vid AS vid, base.name AS name, base.description AS description, base.format AS format, base.weight AS weight, base.language AS language, base.i18n_tsid AS i18n_tsid, v.machine_name AS vocabulary_machine_name FROM {taxonomy_term_data} base INNER JOIN {taxonomy_vocabulary} v ON base.vid = v.vid WHERE (base.tid IN (:db_condition_placeholder_0)) AND (base.language IN (:db_condition_placeholder_1, :db_condition_placeholder_2)) ; Array ( [:db_condition_placeholder_0] => 0 [:db_condition_placeholder_1] => de [:db_condition_placeholder_2] => und ) in DrupalDefaultEntityController->load() (Zeile 196 von /var/www/html/cm7/includes/entity.inc).

During installation of i18n_string the following error message is issued:

DatabaseSchemaObjectExistsException: Die Datenbanktabelle <em class="placeholder">i18n_strings</em> ist bereits vorhanden. in DatabaseSchema->createTable() (Zeile 630 von /var/www/html/cm7/includes/database/schema.inc).

Shall I drop the table first? Or should the installation procedure check this?

Or when can I find the definition of the missing "base" columns?

Blooniverse’s picture

Dear @GStegemann:

  • How did you uninstall/reinstall? Don't forget to really uninstall/reinstall via Drupal backend - and not just disable/enable!
  • Table dropping: If you procede as described above, the system will drop the tables automatically! Should you prefer to use Drush (Drupal Shell), then Drush uninstalls the tables for you.
  • Definition of 'base' column: The columns and fields specifications can be found in the 'foo_name.install' file - SQL!

Please keep me/us informed about your progress!

GStegemann’s picture

Dear the_phi,

yes, I only disabled/enabled the module.

Following your suggestion I fully uninstalled the module. However, the table i18n_strings was not dropped by the system. Therefore I dropped the table manually. Then the re-installation went through w/o any errors.

There is may be one issue: everytime I enable another module a message is displayed that the string definition 'node:type:panel:description' was updated. Any ideas what is causing this?

enkara’s picture

Could you please indicate which columns should be added manually? I can't uninstall the module, as I already have a lot of info I don't want to loose. If you could put the sql query would be really useful.

Here's what I've used, not sure if it's correct:

ALTER TABLE taxonomy_term_data ADD i18n_tsid INT NOT NULL DEFAULT 0;

Thank you

GStegemann’s picture

Looks fine to me so far. But as described in issue #1066886: Column not found: 1054 Unknown column 'base.i18n_tsid' in 'field list' the data type should be "INT UNSIGNED".

Jose Reyero’s picture

Blooniverse’s picture

Thank you for the hint, @Jose! I am, at the moment, comparing the output of Schema's SQL tab 'admin/structure/schema/sql' with phpMyAdmin's structure display!

Blooniverse’s picture

... I've checked 'i18n' more or less thoroughly. It consists of the following main module and submodules:

Block languages (module_root/i18n_block/)
Field translation (module_root/i18n_field/)
Internationalization (module_root/i18n.module)
Menu translation (module_root/i18n_menu/)
Multilingual content (module_root/i18n_node/)
Multilingual forum (module_root/i18n_forum/)
Multilingual select (module_root/i18n_select/)
Multilingual variables (module_root/i18n_variable/)
Path translation (module_root/i18n_path/)
String translation (module_root/i18n_string/)
Synchronize translations (module_root/i18n_sync/)
Taxonomy translation (module_root/i18n_taxonomy/)
Translation redirect (module_root/i18n_redirect/)
Translation sets (module_root/i18n_translation/)

In the Drupal database 'i18n' creates following independent tables (along with alterations of existing tables!):

i18n_block_language
i18n_path
i18n_strings
i18n_translation_set
i18n_variable

My Advise:

If possible, uninstall/reinstall all of 'i18n'! This is the safest way. If not possible, respectively completely possible, procede with #1.

  1. Use 'Schema' module to get to all the db/table schemes -- 'admin/structure/schema/sql'!
  2. Search for the string 'i18n' and compare with (for instance) phpMyAdmin's structure.
  3. Alter table columns respectively field types manually where necessary. The usage of SQL is not necessary here -- just use (for instance) phpMyAdmin's structure display/tab!

Below you find the affected SQL statements according to the output of 'admin/structure/schema/sql'.

CREATE TABLE {block} (
`bid` INT NOT NULL auto_increment, 
`module` VARCHAR(64) NOT NULL DEFAULT '', 
`delta` VARCHAR(32) NOT NULL DEFAULT '0', 
`theme` VARCHAR(64) NOT NULL DEFAULT '', 
`status` TINYINT NOT NULL DEFAULT 0, 
`weight` INT NOT NULL DEFAULT 0, 
`region` VARCHAR(64) NOT NULL DEFAULT '', 
`custom` TINYINT NOT NULL DEFAULT 0, 
`visibility` TINYINT NOT NULL DEFAULT 0, 
`pages` TEXT NOT NULL, 
`title` VARCHAR(64) NOT NULL DEFAULT '', 
`cache` TINYINT NOT NULL DEFAULT 1, 
`i18n_mode` INT NOT NULL DEFAULT 0 COMMENT 'Block multilingual mode.', 
PRIMARY KEY (`bid`), 
UNIQUE KEY `tmd` (`theme`, `module`, `delta`), 
INDEX `list` (`theme`, `status`, `region`, `weight`, `module`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8;

CREATE TABLE {i18n_block_language} (
`module` VARCHAR(64) NOT NULL, 
`delta` VARCHAR(32) NOT NULL, 
`language` VARCHAR(12) NOT NULL DEFAULT '', 
PRIMARY KEY (`module`, `delta`, `language`), 
INDEX `language` (`language`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8;

CREATE TABLE {i18n_path} (
`tpid` INT unsigned NOT NULL auto_increment, 
`tsid` INT unsigned NOT NULL, 
`path` VARCHAR(255) NOT NULL DEFAULT '', 
`language` VARCHAR(12) NOT NULL DEFAULT '', 
`pid` INT unsigned NOT NULL DEFAULT 0, 
PRIMARY KEY (`tpid`), 
UNIQUE KEY `set_language` (`tsid`, `language`), 
INDEX `path` (`path`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8;

CREATE TABLE {i18n_strings} (
`lid` INT NOT NULL DEFAULT 0, 
`textgroup` VARCHAR(50) NOT NULL DEFAULT 'default', 
`context` VARCHAR(255) NOT NULL DEFAULT '', 
`objectid` VARCHAR(255) NOT NULL DEFAULT '', 
`type` VARCHAR(255) NOT NULL DEFAULT '', 
`property` VARCHAR(255) NOT NULL DEFAULT '', 
`objectindex` INT NOT NULL DEFAULT 0, 
`format` VARCHAR(255) NULL DEFAULT NULL, 
PRIMARY KEY (`lid`), 
INDEX `group_context` (`textgroup`, `context`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8;

CREATE TABLE {i18n_translation_set} (
`tsid` INT unsigned NOT NULL auto_increment, 
`title` VARCHAR(255) NOT NULL DEFAULT '', 
`type` VARCHAR(32) NOT NULL DEFAULT '', 
`bundle` VARCHAR(128) NOT NULL DEFAULT '', 
`master_id` INT unsigned NOT NULL DEFAULT 0, 
`status` INT NOT NULL DEFAULT 1, 
`created` INT NOT NULL DEFAULT 0, 
`changed` INT NOT NULL DEFAULT 0, 
PRIMARY KEY (`tsid`), 
INDEX `entity_bundle` (`type`, `bundle`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8;

CREATE TABLE {locales_target} (
`lid` INT NOT NULL DEFAULT 0, 
`translation` BLOB NOT NULL, 
`language` VARCHAR(12) NOT NULL DEFAULT '', 
`plid` INT NOT NULL DEFAULT 0, 
`plural` INT NOT NULL DEFAULT 0, 
`l10n_status` INT NOT NULL DEFAULT 0, 
`i18n_status` INT NOT NULL DEFAULT 0 COMMENT 'A boolean indicating whether this translation needs to be updated.', 
PRIMARY KEY (`language`, `lid`, `plural`), 
INDEX `lid` (`lid`), 
INDEX `plid` (`plid`), 
INDEX `plural` (`plural`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8;

CREATE TABLE {menu_custom} (
`menu_name` VARCHAR(32) NOT NULL DEFAULT '', 
`title` VARCHAR(255) NOT NULL DEFAULT '', 
`description` TEXT NULL DEFAULT NULL, 
`i18n_mode` INT unsigned NOT NULL DEFAULT 0, 
`language` VARCHAR(12) NOT NULL DEFAULT 'und', 
PRIMARY KEY (`menu_name`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8;

CREATE TABLE {menu_links} (
`menu_name` VARCHAR(32) NOT NULL DEFAULT '', 
`mlid` INT unsigned NOT NULL auto_increment, 
`plid` INT unsigned NOT NULL DEFAULT 0, 
`link_path` VARCHAR(255) NOT NULL DEFAULT '', 
`router_path` VARCHAR(255) NOT NULL DEFAULT '', 
`link_title` VARCHAR(255) NOT NULL DEFAULT '', 
`options` BLOB NULL DEFAULT NULL, 
`module` VARCHAR(255) NOT NULL DEFAULT 'system', 
`hidden` SMALLINT NOT NULL DEFAULT 0, 
`external` SMALLINT NOT NULL DEFAULT 0, 
`has_children` SMALLINT NOT NULL DEFAULT 0, 
`expanded` SMALLINT NOT NULL DEFAULT 0, 
`weight` INT NOT NULL DEFAULT 0, 
`depth` SMALLINT NOT NULL DEFAULT 0, 
`customized` SMALLINT NOT NULL DEFAULT 0, 
`p1` INT unsigned NOT NULL DEFAULT 0, 
`p2` INT unsigned NOT NULL DEFAULT 0, 
`p3` INT unsigned NOT NULL DEFAULT 0, 
`p4` INT unsigned NOT NULL DEFAULT 0, 
`p5` INT unsigned NOT NULL DEFAULT 0, 
`p6` INT unsigned NOT NULL DEFAULT 0, 
`p7` INT unsigned NOT NULL DEFAULT 0, 
`p8` INT unsigned NOT NULL DEFAULT 0, 
`p9` INT unsigned NOT NULL DEFAULT 0, 
`updated` SMALLINT NOT NULL DEFAULT 0, 
`language` VARCHAR(12) NOT NULL DEFAULT 'und', 
`i18n_tsid` INT unsigned NOT NULL DEFAULT 0, 
PRIMARY KEY (`mlid`), 
INDEX `path_menu` (`link_path`(128), `menu_name`), 
INDEX `menu_plid_expand_child` (`menu_name`, `plid`, `expanded`, `has_children`), 
INDEX `menu_parents` (`menu_name`, `p1`, `p2`, `p3`, `p4`, `p5`, `p6`, `p7`, `p8`, `p9`), 
INDEX `router_path` (`router_path`(128))
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8;

CREATE TABLE {taxonomy_term_data} (
`tid` INT unsigned NOT NULL auto_increment, 
`vid` INT unsigned NOT NULL DEFAULT 0, 
`name` VARCHAR(255) NOT NULL DEFAULT '', 
`description` LONGTEXT NULL DEFAULT NULL, 
`format` VARCHAR(255) NULL DEFAULT NULL, 
`weight` INT NOT NULL DEFAULT 0, 
`language` VARCHAR(12) NOT NULL DEFAULT 'und', 
`i18n_tsid` INT unsigned NOT NULL DEFAULT 0, 
PRIMARY KEY (`tid`), 
INDEX `taxonomy_tree` (`vid`, `weight`, `name`), 
INDEX `vid_name` (`vid`, `name`), 
INDEX `name` (`name`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8;

My personal question concerning the db_table 'locales_target': Why is the field type not Boolean here? The comment makes me assume that it is!

Blooniverse’s picture

... holy crap, where is this error (below) coming from now -- after saving a taxonomy/vocabulary term translation? It might seem like a taxo error, but I really don't think it is!

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '101-0' for key 'PRIMARY': INSERT INTO {taxonomy_term_hierarchy} (tid, parent) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => 101 [:db_insert_placeholder_1] => 0 ) in taxonomy_term_save() (Zeile 601 von /var/www/drupal7/modules/taxonomy/taxonomy.module).

Probably I should file a new issue/bug report -- I have not seen anything similar to this!

Status: Fixed » Closed (fixed)

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

Jerome F’s picture

Status: Closed (fixed) » Active

The beta 3 update doesn't solve the problem does it ?
I can uninstall internationalisation menu but not the rest.

Although #12 is very detailed, I still don't know where to start after installing shema.

Blooniverse’s picture

Status: Active » Fixed

@Jerome F: Start at comment#12 in section 'My advice' !
This is not a bug -- this is a matter of the upgrade path procedure respectively a matter of the lacking upgrade paths (dev & alpha modules). The beta versions contain upgrade paths!

Blooniverse’s picture

Component: Code » Upgrade
Blooniverse’s picture

Status: Fixed » Closed (fixed)

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

dotnhack’s picture

It seems the beta4 doesn't fix that error I have installed Internationalization and Variable and JUST enable Variable and I have:

DatabaseSchemaObjectExistsException: Table cache_variable already exists. in DatabaseSchema->createTable() (line 630 of /var/www/vhosts/marioswine.com/httpdocs/includes/database/schema.inc).

The worst part is that I have installed it on my other site and it gave me an error but it works... Hope someone can help me.

andrea.corelli’s picture

Sorry guys, shouldn't this be fixed on beta's? I installed latest beta and it still won't add the missing fields.

70111m’s picture

subscribe

m_wiking’s picture

I have just tested this and I get this in the latest dev version

DatabaseSchemaObjectExistsException: Table i18n_string already exists. in DatabaseSchema->createTable() (line 629 of/var/www/mysite/includes/database/schema.inc).

my-family’s picture

Status: Closed (fixed) » Active

The same problem also in 7.x-1.8 with i18n_block_language.

I had to uninstall the module and drop the table manually. But it is not possible on production site. So i think the issue is not fixed.

In addition, this problem breaks the block administration (after enabling Block languages, I was not able to edit and save any block, even without multilingual settings:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'i18n_mode' in 'field list': UPDATE {block} SET i18n_mode=:db_update_placeholder_0 WHERE (module = :db_condition_placeholder_0) AND (delta = :db_condition_placeholder_1) ; Array ( [:db_update_placeholder_0] => 0 [:db_condition_placeholder_0] => search [:db_condition_placeholder_1] => form ) ve funkci i18n_block_form_block_admin_configure_submit()

Jose Reyero’s picture

Status: Active » Closed (fixed)

Sorry but if trying pre-release dev versions you need to be ready / capable for some manual table updates.
(And if not, we need to know exactly which upgrade path you've followed)

AdamGerthel’s picture

I'm having the same problem as #24 using the released 7.x-1.8 (not dev). Activating Block i18n crashes the site completely:

kenorb’s picture