On home page:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: SELECT n.uid AS uid, n.created AS created FROM {node} n WHERE (n.status = :db_condition_placeholder_0) AND (n.type IN ()) ; Array ( [:db_condition_placeholder_0] => 1 ) in _archive_post_count() (line 385 of /home/mysite/public_html/sites/all/modules/archive/archive.module).

Maybe error is because block already displayed on home page, when activating module.

This patch helped me:

In file: archive.module

$node_query->condition('n.type', $final_types, 'IN');

change it to this:

if (!empty($final_types)) {
  $node_query->condition('n.type', $final_types, 'IN');
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lomasr’s picture

The issue is - if you do not select the content type, it will show the error . Its been mentioned in readme.txt file also. I have added a patch for this .Please review.

prabhu9484’s picture

Reviewed the patch - it works thanks @lomasr

poornima.n’s picture

Assigned: Unassigned » poornima.n
poornima.n’s picture

The patch works perfectly fine

poornima.n’s picture

FileSize
39.64 KB

After applying the patch the error gets removed, but the drupal message should disappear after second refresh, which is not happening.

poornima.n’s picture

poornima.n’s picture

Assigned: poornima.n » Unassigned