Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#54403 closed defect (bug) (duplicate)

Changing featured image causes only one image show in media modal (using Classic Editor)

Reported by: szaqal21's profile szaqal21 Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.8.1
Component: Post Thumbnails Keywords:
Focuses: Cc:

Description

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();
		}
	});
}

Attachments (2)

1.png (251.0 KB) - added by szaqal21 3 years ago.
Infinite scroll is off and featured image is set for the first time.
2.png (65.8 KB) - added by szaqal21 3 years ago.
Infinite scroll is off and trying to chnage featured image

Download all attachments as: .zip

Change History (4)

@szaqal21
3 years ago

Infinite scroll is off and featured image is set for the first time.

@szaqal21
3 years ago

Infinite scroll is off and trying to chnage featured image

#1 @szaqal21
3 years ago

I forgot to write that after selecting featured image for the first time post has to be saved (page reload is necessary) to see this bug.

#2 @sabernhardt
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the report and possible solution!

We are already tracking this issue on #53765, so please add to the discussion there to help move it forward.

Note: See TracTickets for help on using tickets.