#30640 closed defect (bug) (invalid)
Order/sort of attachments logic
Reported by: | Stagger Lee | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0.1 |
Component: | Media | Keywords: | close |
Focuses: | Cc: |
Description
Sorry for making this as "defect", other 2 options doesnt seems right here too.
I explained everything here in detail.
Now, i just ask for some explanation why it is such logic and why such behaviour ?
Some C/P from this topic:
- My images are named as _DSCXXX.
- I upload say 200 images from one party at once, no errors, all went fine.
(number of images is not relevant here, I just use pagination for multiple galleries per post)
- I uppload them in the post, they are ordered OK after logic. Last uploaded is at the top, it means my last at the bottom of Windows Explorer window. So long logic is respected.
- I preview images in "All media items", they are shown nice, as it was upload order.
And now comes hell.
- "Uploaded to this post" cannot keep same logic as "All media items".
- Even if I naive tought i could use only "All media items" for building galleries, in my sight (view) i check images and all seems OK, but as soon i make gallery they are again randomized.
It is not classic random functions, rows seems to keep upload order, but they are shifted.
So you have say 3 rows from end at the beginning, 3 rows from beginning at the end, rows in the middle are shifted to. Abosultely no logic in this sorting.
Change History (6)
#2
@
10 years ago
Found one more thing. If i use "All media items" and check gallery images with Ctrl + click on each image then it works.
If i use Shift + click on last image for gallery, then it is randomized in some way.
It can work in "All media items" because this view doesnt shuffle images when i scroll down. But not in "Uploaded to this post". As soon i past (scroll down) some row levels it shuffle by itself.
Man this is so confusing.
#3
@
10 years ago
I just tested to rise number of attachments pulled by Ajax, even risking server limits. Easy to revert it back. First i C/P code from media-models.js to media-models.min.js for easier troubleshooting. And changed line 1144 to:
defaultArgs: { posts_per_page: 300 },
Just for quick test, any number above my number of images uploaded to this post.
Guess what ? Of course order of images are exactly as in "All media items". Can someone says a word about it ?
Is it complicated to solve in core.
As it is now "Uploaded to this post" can only be used for galleries with 5-10-20-40 images. It is shame. because Media Manager has undergone nice code change, became very powerfull, and native WP gallery now can replace very powerfull gallery plugins.
With custom post types and custom fields there would be absolutely no need for any other media plugin.
#4
@
10 years ago
This fix helped me with sorting problem. Not 100% but it can be used now without big problems.
I will test it more next days.
(How do you link trac numbers ?)
Most important thing here is this, and for heaven i cannot explain it: