PROBLEM: Getting a PDOException trying to enable a language.

From the logs:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.comment' doesn't exist: SELECT meta.entity_id AS entity_id, meta.entity_type AS entity_type FROM {lingotek_entity_metadata} meta WHERE (meta.entity_key = :db_condition_placeholder_0) AND (entity_id NOT IN (SELECT n.nid AS nid FROM {node} n WHERE ( (n.tnid = :db_condition_placeholder_1) OR (n.tnid = n.nid) )AND (n.language = :db_condition_placeholder_2) )) AND (entity_id NOT IN (SELECT c.cid AS cid FROM {comment} c WHERE (c.language = :db_condition_placeholder_3) )) AND (entity_id NOT IN (SELECT t.tid AS tid FROM {taxonomy_term_data} t WHERE (t.language = :db_condition_placeholder_4) )) ; Array ( [:db_condition_placeholder_0] => document_id [:db_condition_placeholder_1] => 0 [:db_condition_placeholder_2] => de-de [:db_condition_placeholder_3] => de-de [:db_condition_placeholder_4] => de-de ) in LingotekSync::insertTargetEntriesForAllEntities() (line 165 of /var/www/docroot/sites/all/modules/contrib/lingotek/lib/Drupal/lingotek/LingotekSync.php).
WORKAROUND: Simply enabling/disabling the comment module creates the 'comment' table, then Lingotek works fine :
drush en comment
drush dis comment
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Lingotek-PDO_Exception_Comment-2568959-3-7.x.patch | 4.32 KB | fathershawn |
| language-add-error.png | 67.06 KB | chipk |
Comments
Comment #2
dasginganinjaI just experienced this issue as well. We do not use the comment module on any of our installs and typically start from the minimal profile. Hope this helps!
Comment #3
fathershawnHere is a patch that wraps both the comment update hook and the comment code in LingotekSync::insertTargetEntriesForAllEntities() in conditional checks for the comment module.
Comment #4
fathershawnComment #5
smithworx commentedComment #7
jbhovik commentedThanks for your contributions, everyone!
Comment #8
jbhovik commentedComment #9
jbhovik commented