Karl_T Posted May 28, 2017 Share Posted May 28, 2017 Every time I upload multiple images to any image fields at the same time, no matter I drag multiple or choose multiple images, most files randomly not uploaded. Most of the time only the first image is uploaded. The error message is SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2276-0' for key 'PRIMARY' INSERT INTO `field_images` (pages_id, sort, `data`, `description`, `modified`, `created`) VALUES(2276, 0, 'twitter-1.svg', '[\"\"]', '2017-05-28 13:04:54', '1970-01-01 08:00:10') So, it seem like this is because of the duplicated sort index. If I drag images into the field or choose the images one by one, there is no issue. That means when multiple files are uploaded, the sort index generated are the same most of the time. This most likely is PW side issue, but I tested this in a fresh installed PW without issues. This just happens in that particular server. I have updated PW to latest from 3.060 to 3.063dev. The issue still persists. Thanks. Link to comment Share on other sites More sharing options...
cstevensjr Posted May 28, 2017 Share Posted May 28, 2017 16 minutes ago, Karl_T said: This most likely is PW side issue, but I tested this in a fresh installed PW without issues. This just happens in that particular server. I have updated PW to latest from 3.060 to 3.063dev. The issue still persists. Thanks. If you are not having this problem on a fresh install but only on one particular PW installation, how are you sure that this is a PW side issue? Link to comment Share on other sites More sharing options...
Karl_T Posted May 28, 2017 Author Share Posted May 28, 2017 Thanks for your reply. The issue seems to be the duplication of sort index. I think the sort index is generated and then handled by PW, isn't it? Would you mind telling me any other possibilities so that I can check on them? Link to comment Share on other sites More sharing options...
kixe Posted May 28, 2017 Share Posted May 28, 2017 Normally there cannot be a duplication of the sort index for the same pages_id. Before an Imagefield is stored all page related entries (pages_id == $page->id) are deleted first from the database before the new sorted images are stored (@see /wire/core/FieldtypeMulti.php) .Try to clear manually all related entries from the database and try again. 1 Link to comment Share on other sites More sharing options...
Karl_T Posted May 28, 2017 Author Share Posted May 28, 2017 Sorry for your time. This is the lack of session lock issue inside my own Redis module. I have to find time to fix that. Reference: https://github.com/processwire/processwire-issues/issues/132 Link to comment Share on other sites More sharing options...
renobird Posted August 22, 2017 Share Posted August 22, 2017 Hi All, I've been having this issue lately and I'm not sure where to start looking. We aren't running Redis, so it's not resolved by the link @Karl_T linked above. Sometimes multiple images upload fine, sometimes i get this: Any guidance would be much appreciated. Processwire 2.8.62 PHP 5.6.25 MySQL 5.0.11 Link to comment Share on other sites More sharing options...
szabesz Posted August 22, 2017 Share Posted August 22, 2017 2 hours ago, renobird said: MySQL 5.0.11 Hi, Isn't there a typo here? MySQL 5.0.11 is from about 2005. 1 Link to comment Share on other sites More sharing options...
renobird Posted August 22, 2017 Share Posted August 22, 2017 hahaha! Yeah. Wow. I think bare wires touched in my head and I just typed out a version that I used for ages. MySQL version is 5.6.36 1 Link to comment Share on other sites More sharing options...
renobird Posted August 24, 2017 Share Posted August 24, 2017 I had one of the admins at our host explore possibilities on their side. Basically they came back with nothing and suggested I continue to explore this as a ProcessWire issue. Anyone have any additional thoughts on this? 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