PROBLEM: Getting a PDOException trying to enable a language.

none

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

Comments

chipk created an issue. See original summary.

dasginganinja’s picture

I 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!

fathershawn’s picture

Here is a patch that wraps both the comment update hook and the comment code in LingotekSync::insertTargetEntriesForAllEntities() in conditional checks for the comment module.

fathershawn’s picture

Status: Active » Needs review
smithworx’s picture

Assigned: Unassigned » jbhovik

  • jbhovik committed 781097f on 7.x-7.x authored by FatherShawn
    Issue #2568959 by FatherShawn, chipk, dasginganinja, jbhovik:...
jbhovik’s picture

Thanks for your contributions, everyone!

jbhovik’s picture

Status: Needs review » Reviewed & tested by the community
jbhovik’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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