I am worried about a big error found on my website.Yesterday it was working and today morning i found the issue.Please help me to solve it.

Error message:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1532856' for key 'PRIMARY': INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:6:"Notice";s:8:"!message";s:46:"Undefined index: field_enter_module_name_here";s:9:"%function";s:9:"include()";s:5:"%file";s:112:" example.com\sites\all\themes\nexus\templates\field-collection-item.tpl.php";s:5:"%line";i:37;s:14:"severity_level";i:5;} [:db_insert_placeholder_4] => 5 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://example.com/ [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => 1432102144 ) in dblog_watchdog() (line 160 of example.com\modules\dblog\dblog.module).

  • Did you update some thing on db table ?
    – Nishant
    May 20, 2015 at 6:42
  • what version of Drupal are you running, at LEAST 7.32? May 20, 2015 at 6:53
  • @NishantP why do you want to increase memory limit ? it doesn't make sense here. does it ? :D
    – shrish
    May 20, 2015 at 7:09
  • if you are not worried about previous logs, try uninstalling Database logging module and try installing back. this should fix your problem.
    – shrish
    May 20, 2015 at 7:12
  • I haven't done anything in DB,drupal version is 7.35, i was not trying to put undefined variable in the watchdog table.i can see 'field_enter_module_name_here' in field-collection-item.tpl.php
    – harikris
    May 20, 2015 at 7:36

1 Answer 1


There are 2 things going on here.

  1. The PDOException is because Watchdog is trying to insert a duplicate primary key, 1532856. Your auto increment value could be off or some other table corruption could be going on there. A simple fix is to truncate the watchdog table if you don't care about maintaining old log data. Otherwise, you could try to repair the table or fix the auto increment value if you want to retain old log data.
  2. The error being logged has to do with your field-collection-item.tpl.php template in the Nexus theme on line 37. A key called field_enter_module_name_here is being referenced when it doesn't exist. It looks to be a custom template addition to the theme (it doesn't exist in the 7.x-1.3 release). Given, the key name, it sounds like some sort test code dropped into this template. This is warning so it shouldn't be a critical problem, but you should fix it to clean out extraneous errors from filling up your logs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.