horst Posted July 1, 2015 Posted July 1, 2015 Every now and then (once a week or lesser) I get emailed the following error notification on one site that's running PW 2.6: Page: http://example.com/http404/ User: guest Error: Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '41-0' for key 'PRIMARY' (in /www/htdocs/example.com/wire/core/FieldtypeMulti.php line 261) Does someone know what I may have missconfigured or what is responsible for it / where I should look into? 1
Soma Posted July 1, 2015 Posted July 1, 2015 If you have some import script/bootstrap or maybe or alike that will result sometimes in a /http404/, I'm seeing that since long time in logs when errors occur. Meaning there's no page with a url. Bootstraped scripts also result in a "guest" user. Or if it is triggered by a lazycron by a guest visit. A little annoying in that you need to know it or assume it's happening on the 404 page, which is not true. I wonder if it would be possible to fix this. 1
Macrura Posted July 1, 2015 Posted July 1, 2015 i had a site that was experiencing that error, once i upgraded core and all modules, i have not had any further errors; 2
horst Posted July 1, 2015 Author Posted July 1, 2015 If you have some import script/bootstrap or maybe or alike that will result sometimes in a /http404/, I'm seeing that since long time in logs when errors occur. Meaning there's no page with a url. Bootstraped scripts also result in a "guest" user. Or if it is triggered by a lazycron by a guest visit. A little annoying in that you need to know it or assume it's happening on the 404 page, which is not true. I wonder if it would be possible to fix this. Oh, thanks, thats very helpful. I have a cron running there that starts a bootstrapped script two times per day. I think I put in some code to make it first login as a special user to be sure that it is the script that produces sometimes the errors. A bit weird with the error message is, that a page with ID 1062 exists, but it get not touched with the bootstrapped script. Also I have dumped the complete DB into an editor and searched for the string '41-0', but it isn't present, not only one times. And yes, it is a little annoying if one do not know this. The first thing I have done was uninstalling a module (jumplinks) that can be configured to deal with 404s. I've put all redirects into the htaccess file and after that for two weeks no error occured. But than it occured again without any further change on the site.
Soma Posted July 1, 2015 Posted July 1, 2015 "41-0" PRIMARY I think it is an indize of pages_id and sort or alike. FieldtypeMulti can be a lot. It could also be a page field etc. 1062 is the #id of the error not a page Welcome to advanced PW. I've been there since a long time. 1
horst Posted July 1, 2015 Author Posted July 1, 2015 "41-0" PRIMARY I think it is an indize of pages_id and sort or alike. FieldtypeMulti can be a lot. It could also be a page field etc. 1062 is the #id of the error not a page Ah, ok. It's an error ID. Welcome to advanced PW. I've been there since a long time. Feels like "thin air",
valan Posted October 22, 2015 Posted October 22, 2015 Gents, did you find source of this error? I get it from time to time and even can't understand how to debug it... Quite annoying...
LostKobrakai Posted October 22, 2015 Posted October 22, 2015 The error essentially means something is trying to insert a record in the database with the unique key being one, that's already present. Not very helpful on it's own, but the db doesn't have any more knowledge about what you're trying to do at that point. 1
Can Posted December 12, 2015 Posted December 12, 2015 I'm getting the same error and quite often. Maybe it's about the admin/superuser account? Cause Soma said indice of pages_id and sort in this case, or at least in my case it should be about language or roles field of the superuser, but I'm not changing my own language or roles any where via api only having a few $user->isSuperuser conditionals...installation is quite new PW 2.7.1 just a few module manually imported from another PW installation and re-modeled almost everything Would love to fix this, but as long as nobody else will be annoyed by this error visibly it's not too bad.. ;-)
alan Posted September 2, 2016 Posted September 2, 2016 +1 (I am seeing this error once a day (I think) on a site). I assume it's when my hosting are doing a backup and SQL is momentarily offline - no reason, other than a hunch. I was about to (using jumplinks) point /http404/ at / in the hope it cured it, but I suspect it would not.
rst Posted June 29, 2017 Posted June 29, 2017 i am having this issue as well. it happens when i try to save certain pages on the back end. i click save, it takes me to the error page, when i go back to the page i was trying to save, the content i added is missing. 1
Mirza Posted July 24, 2017 Posted July 24, 2017 Hi, Even I am facing the same issue, do we have any solution for this? I have a field which holds multi language called hotel name when it tries to change the Arabic name to some other value and save it says the below error and Arabic field value not saved. Quote SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '88-14191' for key 'name1056_parent_id' When I checked in DB pages table has unique key Quote UNIQUE KEY `name1056_parent_id` (`name1056`,`parent_id`), as shown in the attachment. The value for field name1056 is null but It has value saved for Arabic text already. Now, I am stuck with this issue, anyone has any solution to this?
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