Skip to content

[WP 6.6-RC1] Featured Image Media Modal only shows the latest uploaded image #63058

@jartes

Description

@jartes

Description

When setting a featured image using the post/page settings, only the last uploaded image is displayed in the media library modal:

Markup on 2024-07-02 at 15:42:06

This happens on WordPress 6.6-RC1 and with and without the Gutenberg plugin active.

The following JavaScript error is being displayed on the browser console:

media-models.min.js?ver=6.6-RC1:2 
Uncaught TypeError: t.get is not a function
    at n.comparator (media-models.min.js?ver=6.6-RC1:2:5566)
    at e.comparator (media-views.min.js?ver=6.6-RC1:2:7240)
    at Array.sort (<anonymous>)
    at n.sort (backbone.min.js?ver=1.5.0:2:11690)
    at n.set (backbone.min.js?ver=1.5.0:2:10286)
    at n.add (backbone.min.js?ver=1.5.0:2:8973)
    at n.validate (media-models.min.js?ver=6.6-RC1:2:2960)
    at n._validateHandler (media-models.min.js?ver=6.6-RC1:2:3953)
    at p (backbone.min.js?ver=1.5.0:2:3818)
    at f (backbone.min.js?ver=1.5.0:2:3497)

Props to @mrfoxtalbot for finding out about this issue.

Step-by-step reproduction instructions

  1. Use a site with WordPress 6.6-RC1, with or without the Gutenberg plugin active.
  2. Make sure you have a few images on the site media library
  3. Create a new post/page.
  4. Click on the Set features image button.
  5. Check that only the last uploaded image is being displayed.

Screenshots, screen recording, code snippet

Screen recording with the steps to reproduce this error:

Screen.Capture.on.2024-07-02.at.15-37-54.mp4

Environment info

WordPress Version: 6.6-RC1
Theme: Twenty Twenty-FourVersion: 1.1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Post Featured ImageAffects the Post Featured Image Block[Feature] MediaAnything that impacts the experience of managing media[Priority] Highest (OMGBBQ)Used to indicate widespread, critical issues that need immediate attention[Type] BugAn existing feature does not function as intended[Type] RegressionRelated to a regression in the latest release

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions