WordPress.org

Ready to get started?Download WordPress

Forums

Bug in media uploader (1 post)

  1. Jan Nowak
    Member
    Posted 2 years ago #

    Hi, I should send this post to trac, but the page is not loading (probably it's because censorship in a country where I'm currently in) so I'm writing here hoping that someone will handle it.

    There is a problem with media uploader in WP 3.4.1, steps to reproduce:

    - create new post, open media uploader, choose html5 uploader, select 2 big files (depending on your internet connection speed)
    - when the first file is loaded open it (click the "show" link, it will change to "hide") and wait for the second one

    What happens:
    The link "hide" changes to "show", if I want to slide up the image info I need to click it once (it changes to "hide") and then second time (image info hides and link changes to "show")

    What should happen:
    The link shouldn't change to "show" and clicking it once should close the image info

    Simple workaround:
    In file wp-includes\js\plupload\handlers.dev.js comment the line #67:

    function updateMediaForm() {
    var items = jQuery('#media-items').children();

    // Just one file, no need for collapsible part
    if ( items.length == 1 ) {
    items.addClass('open').find('.slidetoggle').show();
    jQuery('.insert-gallery').hide();
    } else if ( items.length > 1 ) {
    >>> THE LINE TO COMMENT
    //items.removeClass('open');
    >>> END OF THE LINE TO COMMENT
    // Only show Gallery button when there are at least two files.
    jQuery('.insert-gallery').show();
    }

    I'm not sure if it won't affect anything else but for me now it works as expected

    Thanks for fixing it in the next version of WP :)

Topic Closed

This topic has been closed to new replies.

About this Topic