Page 1 of 1

Error message when trying to upload a photo to CLOG

Posted: 31 Dec 2020, 05:45
by bekateen
Hi Jools,

Tonight I tried to add a photo to the CLOG page for .

When I did, the photo was rejected with this message:
Something went wrong, the selected new position is different from number of actual images. (seq_no=2, image_count=2) - please report.
Sorry,
Eric

Details:
Caption: Rio Ariari drainage
Reproduced from: Mendez-Lopez, A. et al. (2019). Sistemas de Humedales de la Cuenca MEDIA del GUAVIARE, DEPARTAMENTO DEL META- COLOMBIA PECES, ANFIBIOS y REPTILES de las Lagunas San Vicente y Loma Linda.

Re: Error message when trying to upload a photo to CLOG

Posted: 31 Dec 2020, 05:51
by bekateen
Okay, that's weird. In spite of the error message, the picture upload appears to have been successful. That is very confusing.

Cheers, Eric

Re: Error message when trying to upload a photo to CLOG

Posted: 31 Dec 2020, 08:59
by Jools
Seems like it was old bad data. Each image has a sequence number (seq no) which determines the order in which the images are shown. The best, single first larger image is shown is seq 1 and so on. The error is when the sequence number has gaps/shows an incorrect total. Historically there was an issue when this happened a from time to time which I never really got to the bottom of but appeared to resolve by some change I made. My suspicion is when the back button or browser history functions are used in conjunction with the admin pages.

Anyway, the image was added and looks OK to me. I also re-ordered the images on the page which is a good check everything is OK.

So, not a bug in the code, rather an error in the data which is fixed. That said, you're right to be cautious, this can cause merry hell with species where there are lots of images. Hopefully, we have seen the last of those (although, IIRC, Synodontis brichardi is one I need to fix at some point).

Cheers,



Jools