Zeka Posted April 6, 2017 Share Posted April 6, 2017 Hi. I have several sites on which I periodically get this exception SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '41-0' for key 'PRIMARY' (in /wire/core/FieldtypeMulti.php line 295) All exceptions go from URLs http404 or 404. I understand what this exception means, but can't found out what is causing it. Do you have any suggestions? 1 Link to comment Share on other sites More sharing options...
szabesz Posted April 6, 2017 Share Posted April 6, 2017 Hi Zeka, There seem to be topics about this issue: 3 Link to comment Share on other sites More sharing options...
Zeka Posted April 6, 2017 Author Share Posted April 6, 2017 Thank @szabesz Don't know how I missed them. 1 Link to comment Share on other sites More sharing options...
froot Posted November 2, 2020 Share Posted November 2, 2020 I get a very similar issue (repeatedly) SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4612-0' for key 'PRIMARY' (4612 being the highest page-id, I think) I get the above error message (just 4612-0, 4612-1, 4612-16, … would vary like that) a couple of times when uploading multiple images to an images-field when I upload multiple images at once. It happens on every PW-installation I run on easyname.com webhosting so I doubt it has to do with any modules because the website-installations are quite different and even on the simplest of them it still happens (no hooks or ->save() commands in my php code). Doesn't happen on local though for the same websites and databases. And unfo I don't have any other webhost to compare it with. I talked to the host, they advised me to address ProcessWire. I guess it has to be some basic database structure configurations but it's beyond me and I'm hesitant to mess with it. Might it have to do with the incremental number? Do I need to reset it? How do I? Why is in in conflict? I very much appreciate any help! Link to comment Share on other sites More sharing options...
Andy Posted November 14, 2022 Share Posted November 14, 2022 On 4/6/2017 at 5:30 AM, Zeka said: Hi. I have several sites on which I periodically get this exception SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '41-0' for key 'PRIMARY' (in /wire/core/FieldtypeMulti.php line 295) All exceptions go from URLs http404 or 404. I understand what this exception means, but can't found out what is causing it. Do you have any suggestions? Make a static page 404.html Fix the line in the .htaccess file From ErrorDocument 404 /index.php to ErrorDocument 404 /404.html Also, it would be useful to read the article "Optimizing 404 requests in Processwire" 2 Link to comment Share on other sites More sharing options...
froot Posted November 14, 2022 Share Posted November 14, 2022 I don't even remember this issue ? but thanks @Andy 1 Link to comment Share on other sites More sharing options...
Andy Posted November 14, 2022 Share Posted November 14, 2022 @fruid I looked for a solution on the forum. I couldn't find it. I had to write an answer for future generations. 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now