Reported by @m with Calypso staging environment.
https://wordpress.com/media/example.com
for a Jetpack siteFor uploaded photos to appear in order during upload, and not move around or be placed after previously uploaded photos.
I dragged and dropped about 30 photos onto calypso staging, going to ma.tt
They appeared in the media library in essentially random order, intermixed with previous uploads
and they're moving around as the upload completes
Mac-n-Chrome
Found via #dogfooding / #manual-testing
I've following different issues/PRs trying to understand what should be the correct behavior here.
Are we agree with that it should be something like the follwing?
It was fixed for .com
sites in this issue: https://github.com/Automattic/wp-calypso/pull/3577.
Do you know @aduth what could be the difference here between Jetpack and .com sites?
Personally, I couldn't reproduce this issue for Jetpack sites.
Yes, this should have been fixed with #3577, regardless of Jetpack or not. The MediaActions.add
function has seem some changes since then with consideration for image editor. Are we treating Jetpack sites any differently for uploads with the addition of the new v1.2 media endpoints?
Are we agree with that it should be something like the follwing?
Yes, the easiest way to preserve ordering I found was to simply upload in series, one after another.
Are we treating Jetpack sites any differently for uploads with the addition of the new v1.2 media endpoints?
Not at all because we aren't using edit-media
endpoint only when a media is _"edited"_. For this reason, the endpoint expects a mediaID in its path. It will return a 404
if not.
Also, I've taken a screenshot just to be sure:
We still, and make sense, using the new-media
endpoint.
@lancewillett were there any other steps needed to reproduce this? I'm having a hard time getting into that state. Anything special about file age or filename?
@gwwar It's possible it's fixed now based on above comments. I haven't been able to reproduce it either.
I can look again, and also ask Flow Patrol to hammer it a bit in some stress testing.
I tested this on my Jetpack site and the uploads and gallery were in correct order. The gallery shortcode looked like:
[gallery ids="18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39"]
@lancewillett and @alisterscott for the test. This seems to have been fixed.
Are we ok to close this one?
Yes, let's re-open if it happens again.
Tested & confirmed fixed. 51s
Most helpful comment
@gwwar It's possible it's fixed now based on above comments. I haven't been able to reproduce it either.
I can look again, and also ask Flow Patrol to hammer it a bit in some stress testing.