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');
}
Comment | File | Size | Author |
---|---|---|---|
#5 | drupal-message.png | 39.64 KB | poornima.n |
#4 | after-applying-patch.png | 26.3 KB | poornima.n |
#4 | before-applying-patch.png | 44.65 KB | poornima.n |
#1 | Fatal_error_when_activating_module-1996246-1.patch | 724 bytes | lomasr |
Comments
Comment #1
lomasr CreditAttribution: lomasr at gai Technologies Pvt Ltd commentedThe 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.
Comment #2
prabhu9484 CreditAttribution: prabhu9484 commentedReviewed the patch - it works thanks @lomasr
Comment #3
poornima.n CreditAttribution: poornima.n at gai Technologies Pvt Ltd commentedComment #4
poornima.n CreditAttribution: poornima.n at gai Technologies Pvt Ltd commentedThe patch works perfectly fine
Comment #5
poornima.n CreditAttribution: poornima.n at gai Technologies Pvt Ltd commentedAfter applying the patch the error gets removed, but the drupal message should disappear after second refresh, which is not happening.
Comment #6
poornima.n CreditAttribution: poornima.n at gai Technologies Pvt Ltd commentedComment #7
poornima.n CreditAttribution: poornima.n at gai Technologies Pvt Ltd commented