Recent Topics

When I upload the attachments, sometimes submit the post may cause this problem

Started by on Jun 16, 2017 – Contents updated: Jul 16, 2017

Jun 16, 2017 09:43    

The error like this:
B2evolution version : b2evolution 6.8.7-stable

MySQL error!

Duplicate entry '970-1' for key 'link_itm_ID_order'(Errno=1062)

Your query:

UPDATE evo_links

        SET link_itm_ID = 970,

            link_tmp_ID = NULL

 WHERE link_tmp_ID = 578

Jun 17, 2017 12:57

@haharen it looks like you're getting an error from the api rest that was fixed a long time ago here: https://github.com/b2evolution/b2evolution/blob/6.8.7/inc/rest/_restapi.class.php#L1944. It's generated when we change the order of the files before saving the post for the first time. However, it's very weird because it's like those three lines of code don't work, but the rest of the section do.

Can you give us more details about to how to reproduce the issue? For example, are you uploading many files? Is there a particular combination of positions for those attachments? Are you attaching new or already uploaded files?

Jun 17, 2017 14:41

@mgsolipa
The following condition is prone to this problem:

The first create article and with 2 or more files which upload once at a time

The first create article with 1 file attachment, or the second save article even if with more files attachments upload once at a time NOT met this problem.

Jun 17, 2017 21:16

@haharen I confirm the only cases where we can get this error is creating a new post. It's not possible to get it when we edit an already existing post.

I tested this again thinking on all the options that came to my mind, but I'm afraid that I'm unable to reproduce the issue.

There are only a few cases when, for any reason, the upload response is not "clean", and the order field of the second file is set to 1, just as the first file is. In those cases I can get exactly the same error you reported. However, I had to touch the upload scripts to get "not clean" responses, so, as I said before, I'm not able to consistently reproduce the issue under regular conditions.

Please, try to pay attention on the quick uploader response when you're uploading files to new posts. Any "weird" response may lead you to the error. For example: when you upload two images and get both of them assigned to the "Teaser" position may be a signal. The normal case is getting the first one assigned to "Teaser" and the second one assigned to "After 'more'". Please, let us know more details if you get the same error again.

Regards!

Jun 17, 2017 22:13

@mgsolipa

For example: when you upload two images and get both of them assigned to the "Teaser" position may be a signal

Yes, you are exactly right! Just see the screen below: two pictures are teaser position, and the up and down arrows are NOT work, and give a 403 error.
The reason cause this problem maybe the high speed intranet and upload small pics, because I am in the school intranet, get high speed network, then the pics are really small filesize, it is possible that some procedures have not yet had time to reflect but pics upload has been finished.


Form is loading...

powered by b2evolution free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.