• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Mysqli statement execute error : Duplicate entry for key 'PRIMARY'

Digital Doctor

Well-known member
Seems like there is an increase in these types of errors ?
Maybe this thread could be used to troubleshoot them (not sure that is possible).

The generic error is: Mysqli statement execute error : Duplicate entry for key 'PRIMARY'

Xenforo search results [here]

example (1) : Mysqli statement execute error : Duplicate entry '5' for key 'PRIMARY'
Error vB4 Importer. [thread]

Note: Chris Deeming got this error by disabling addons in quick succession. [thread]
Kier added Chris' fix.

Other example threads with this error.





Well-known member
It's not. If an add-on attempts to write a row with the same ID, it happens.
The issue seems to occur mainly when an import is interrupted (which happens frequently with large databases) and the same ID is written to twice. Can this be the case?

This issue in its various forms just keeps reoccuring with various addons. Even on fresh installs.