[wp-trac] [WordPress Trac] #54403: Changing featured image causes only one image show in media modal (using Classic Editor)

WordPress Trac noreply at wordpress.org
Tue Nov 9 12:10:17 UTC 2021


#54403: Changing featured image causes only one image show in media modal (using
Classic Editor)
-----------------------------+-----------------------------
 Reporter:  szaqal21         |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Post Thumbnails  |    Version:  5.8.1
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 Changing featured image causes only one image show in media modal (using
 Classic Editor). This problem appeard in WP ver. 5.8 and is caused by
 infinite scroll setting. When using infinite scroll (is on) media modal
 shows all images, but when infinite scroll is off, then only one image
 shows when trying to change featured image. When featured image is set for
 the first time all images show in media modal (even in infinite scroll is
 off). My current workaround for this bug is to force load more images on
 initialization:

 {{{
 if( ! wp.media.view.settings.infiniteScrolling ) {
         wp.media.controller.FeaturedImage =
 wp.media.controller.FeaturedImage.extend( {
                 initialize : function() {
 wp.media.controller.FeaturedImage.__super__.initialize.apply(this);
                         this.get("library").more();
                 }
         });
 }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54403>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list