WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] Add Media - no way to order all attachments (17 posts)

  1. Dennis
    Member
    Posted 1 year ago #

    Hi,

    I just noticed that in the new Add Media section there is no way to order all the attachments of a post anymore. I have a few themes where I have created different page templates which use the post attachments to show different slideshows and galleries and now my themes users won't be able to order the attachment images.
    If there is any way to do this and that I have missed, please let me know.
    Otherwise, I would like to ask if it is still safe and if it will be safe in future versions to use th old Media window? I have implemented in some sections buttons that open the old media window with this code for example:
    tb_show("Edit images", "media-upload.php?post_id="+postId+"&type=image&tab=gallery&TB_iframe=true", false);
    which allows ordering the images, so if this functionality will be still available in future updates, I think it would be better to implement these buttons everywhere, rather than changing the way it works and cause more confusions to the users.

    Thank you very much!

  2. m_i_n
    Member
    Posted 1 year ago #

    I just noticed that in the new Add Media section there is no way to order all the attachments of a post anymore. I have a few themes where I have created different page templates which use the post attachments to show different slideshows and galleries and now my themes users won't be able to order the attachment images.

    You have right. WP team threw this functionality in WP 3.5, but it was used by many themes and plugins, which now stop to works. What can I do in this situation? How can I replace in my theme old "gallery tab" functionality?

  3. Dennis
    Member
    Posted 1 year ago #

    I really can't believe this - not only the ordering is not working anymore, but you can't save descriptions to the fields in the library anymore.
    It is not only the "Insert into post" and "Insert gallery" functionality that the Media window is used for, lots of themes and plugins use the Media functionality for other ways to build galleries and slideshows. It is not good to remove just like this functionality that used to be working and that has been used a lot. I really like the new Media window, but I also need the old functionality to be working.
    Please at least leave us an option to enable the old Upload/Insert window where we can have the previous functionality still working.

    Otherwise, I have to instruct my themes' thousands of users to change the way they create their slideshows. I have to use the new "Insert gallery" functionality and maybe perform some regular expression checks into the content to accomplish what used to be working before, which is bad.
    Updates like this make me stop using the default WordPress built in features and build my own ones.

  4. Dennis - It autosaves.

  5. Dennis
    Member
    Posted 1 year ago #

    Hi Ipstenu,

    Thanks for your reply!

    I noticed the autosave functionality for the single image details, which don't include the "Description" field anymore - they have the Title, Caption and Alt Text, but not a "Description" field.
    Also, I checked the ordering once again - I was monitoring the AJAX autosave requests, but I didn't see any AJAX requests when I changed the default order. Also, I checked the database entries for the attachments - all of them have menu_order set to 0 which means that no order has been set to them. It seems that ordering works only for the items that you intend to insert directly into the post, but it doesn't work for all the attachments of the post, as it used to work before.

    Once again, here are in short the main two problems:
    - there is no way to set general order to all the attachments of a post anymore
    - there is no Description field anymore

  6. naiad03
    Member
    Posted 1 year ago #

    Hi,
    I have the exact same problem, i use attachments on post and display it in gallery using in many websites, i tried to re-order but it didn't keep my new order...
    'orderby' => 'menu_order',
    Now i can drag the images but i can't keep the order i want.

  7. naiad03
    Member
    Posted 1 year ago #

    The only way i found is to add :
    add_post_type_support( 'attachment', 'page-attributes' );
    So I can now choose the order of my attachment in the media section...
    But it is not a good solution for thoses who use to drag images on their post...

  8. Sorting by menu_order will be back: http://core.trac.wordpress.org/ticket/22608

  9. Dennis
    Member
    Posted 1 year ago #

    It seems that this issue:
    http://core.trac.wordpress.org/ticket/22608
    is about how the gallery is displayed and not about having the default menu order functionality within all the post attachments.

    Anyway, I have already started working on my themes updates, for anyone interested, here is the solution that works best for me:
    - I perform just once getting all the pages that are from slideshow page templates (the ones that use the post attachments) and I insert the gallery shortcode in the beginning of their content. As these pages don't display other content, it is safe for me to insert the gallery shortcode in there.
    - Now, when I load the images for the page, instead of using the get_children function to load the page attachments, I do a regular expression check by using the get_shortcode_regex() function to look for a gallery shortcode and load the images from the gallery.

    I know this is not the best coding solution, but I find this the best way for the users, so they don't get very confused and so that I can make sure that their previous slideshows will be still working.

    WordPress core developers: next time, please make sure you don't remove functionality that used to be working just like this - we love the new features you implement, but it is not good for both developers and users to delete existing functionality. Thank you!

  10. EvGreen
    Member
    Posted 1 year ago #

    I second your concern, I've been using this since recently for custom portfolio posts sliders, and it really was the best possible solution from user pov - upload images, reorder, done - instead of playing with gallery inserts and such. Plus it was very clean from code pov.

    I've been hoping to see them implement this beta release one after another, but since it's already rc2 and it's still absent.. eh. Really don't know how should I replace this to have user-friendly sliders in portfolio custom posts, use regex like you suggested, add custom metas to insert gallery shortcode, or upload images separately. All of this is clunky and hard for user to get a grasp on.

    It's especially annoying since adding sorting to "uploaded to this post" and then maybe save button instead of "insert into post" http://prntscr.com/ky6ec shouldn't be very time consuming. Maybe there are some hooks that would allow me to add this myself?

  11. Andrew Nacin
    Lead Developer
    Posted 1 year ago #

    We understand and recognize the concerns here. We don't want any users fiddling with shortcodes or post content if that's not the best user experience. With regards to a solution:

    It's especially annoying since adding sorting to "uploaded to this post" ... shouldn't be very time consuming

    Yes, we're doing this in 3.5. Amy already linked to http://core.trac.wordpress.org/ticket/22608 above.

    Replying to other comments:

    WordPress core developers: next time, please make sure you don't remove functionality that used to be working just like this

    When rewriting a user feature from the ground up — which is exactly what we just did — we're bound to miss a use case or two. Rediscovering use cases is one of the most important events of a beta testing period.

    I've been hoping to see them implement this beta release one after another, but since it's already rc2 and it's still absent.. eh.

    Next time, please report it. I would have loved to implement this earlier, but it hadn't occurred to us. We're good at what we do, but sometimes things slip past us.

    there is no Description field anymore

    Yeah, that was deliberate. (It still exists when editing an attachment, because it's only relevant in that context.) But, it is likely to return for 3.5 RC3.

  12. EvGreen
    Member
    Posted 1 year ago #

    Hey Andrew

    Yes, we're doing this in 3.5. Amy already linked to http://core.trac.wordpress.org/ticket/22608 above.

    the ticket is now closed, is it in 3.5-RC2-22928 already? I mean, I can't re-order those still, maybe I'm missing something?

    Next time, please report it. I would have loved to implement this earlier, but it hadn't occurred to us. We're good at what we do, but sometimes things slip past us.

    Yea, sorry :( Kinda assumed that you guys were aware of this, because there was a post regarding this at http://ms-studio.net/notes/on-the-wordpress-3-5-media-uploader/ and I think he also brought that up to koopersmiths attention. Lesson learned!

    cheers

  13. Andrew Nacin
    Lead Developer
    Posted 1 year ago #

    Sorry! I thought Amy had linked to its parent ticket, http://core.trac.wordpress.org/ticket/22607.

    And, oh, I've read that post. :-) Both Koop and I have gone through it, but there were a lot of things in there that stood out to us more than this particular use case did. I just missed it. Sometimes we just need a wake-up call. And don't get me wrong, I really appreciate you taking the time to make notes of it now. We'll get it right.

  14. EvGreen
    Member
    Posted 1 year ago #

    awesome! :)

    much love

  15. Dennis
    Member
    Posted 1 year ago #

    Hi Andrew,

    Thank you for your replies - I really appreciate that you guys read our notes and consider what we say.

    I just wanted to say that I didn't report this in the Beta releases, as the old Media window still existed then and for some reason I thought that it will stay there in the official release.

    But, it is likely to return for 3.5 RC3.

    It would be great if it returns, as it will be difficult for users to search the whole Media Library for a single image just to change its description, especially when they have hundreds and thousands of images.

    And I'm sorry to ask, but it didn't really get clear to me from all the conversations - is the menu_order sorting going to be back in the "uploaded to this post" window or not?

    Thank you!

  16. Andrew Nacin
    Lead Developer
    Posted 1 year ago #

    And I'm sorry to ask, but it didn't really get clear to me from all the conversations - is the menu_order sorting going to be back in the "uploaded to this post" window or not?

    Yes, This is fixed in trunk. Expect it in RC3 (soon) or in the latest nightly build (now).

    Marking as resolved. Thanks everyone.

  17. Dennis
    Member
    Posted 1 year ago #

    That's great! Thank you so much!!! :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags