[wp-trac] [WordPress Trac] #42794: Can't upload new media files when multiple media dialogues are present on a single page

WordPress Trac noreply at wordpress.org
Wed Jan 17 11:02:54 UTC 2018


#42794: Can't upload new media files when multiple media dialogues are present on a
single page
---------------------------------------+------------------------------
 Reporter:  carlobeltrame              |       Owner:
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:  Awaiting Review
Component:  Media                      |     Version:  3.7.19
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch has-screenshots  |     Focuses:  javascript
---------------------------------------+------------------------------
Changes (by carlobeltrame):

 * version:  4.8.2 => 3.7.19


Comment:

 Is there anything standing in the way of merging this bug fix? Judging by
 the SVN blame, this bug has existed since at least version 3.7.16 in
 Spetember 2015.
 In the meantime, people who have the same problem can fix it by adding
 this to their plugin or theme functions.php file:
 {{{#!php
 function gloggi_fix_media_uploader() {
 ?><script>
     var oldUploaderStatus = wp.media.view.UploaderStatus;
     wp.media.view.UploaderStatus = oldUploaderStatus.extend({
        initialize: function() {
            oldUploaderStatus.prototype.initialize.call(this);
            this.ready();
        }
     });
 </script><?php
 }
 function gloggi_add_media_modification_js() {
     add_action( 'admin_print_footer_scripts', 'gloggi_fix_media_uploader'
 );
 }
 add_action( 'wp_enqueue_media', 'gloggi_add_media_modification_js' );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42794#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list