Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jartes opened this issue Jul 2, 2024 · 7 comments
Open
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Feature] Media Anything that impacts the experience of managing media [Priority] Highest (OMGBBQ) Used to indicate widespread, critical issues that need immediate attention [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@jartes
Copy link

jartes commented Jul 2, 2024

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

@jartes jartes added the [Type] Bug An existing feature does not function as intended label Jul 2, 2024
@mrfoxtalbot mrfoxtalbot added [Feature] Media Anything that impacts the experience of managing media [Type] Regression Related to a regression in the latest release [Priority] Highest (OMGBBQ) Used to indicate widespread, critical issues that need immediate attention [Block] Post Featured Image Affects the Post Featured Image Block labels Jul 2, 2024
@priethor
Copy link
Contributor

priethor commented Jul 2, 2024

I can reproduce this issue with the environment above, but this issue does NOT reproduce with WordPress 6.5.5 and the current Gutenberg plugin trunk (18.7-rc.1); the error comes directly from WP 6.6. I recommend moving it to a Trac ticket. cc @ironprogrammer

@t-hamano
Copy link
Contributor

t-hamano commented Jul 2, 2024

I was not able to reproduce this issue in WP6.6 RC1 🤔

40653052b781cab1d0535d90bf33c1d6.mp4

@youknowriad
Copy link
Contributor

I think @Mamaduka worked on something related to the media modal for featured image recently right? Maybe you'd know more about this issue?

@Mamaduka
Copy link
Member

Mamaduka commented Jul 2, 2024

I'm having trouble reproducing the issue, but as @priethor mentioned, it's probably coming from the Media Library code maintained on Trac.

Enabling the SCRIPT_DEBUG should load unminifed JS files and give us a better error report.

Edit: I am happy to help debug this further once we have a consistent way of reproducing the bug.

@priethor
Copy link
Contributor

priethor commented Jul 2, 2024

The issue can also be reproduced with Playground.

@jartes and I originally reproduced it with the Beta Tester plugin; are you using a bundled 6.6-rc1 or running the WP 6.6 branch, @Mamaduka @t-hamano?

@Mamaduka
Copy link
Member

Mamaduka commented Jul 2, 2024

@priethor, I've tried the following combos locally.

  • WP 6.5 + Gutenberg trunk ✅
  • WP beta tester plugin upgrade to 6.6 RC, with and without Gutenberg trunk ✅

@t-hamano
Copy link
Contributor

t-hamano commented Jul 3, 2024

I believe I was using WordPress 6.6 RC1 when I tested this issue, but I tested it again and I still can’t reproduce the problem.

  • WP 6.5 + Gutenberg trunk ✅
  • WP beta tester plugin upgrade to 6.6 RC2, with and without Gutenberg trunk ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Feature] Media Anything that impacts the experience of managing media [Priority] Highest (OMGBBQ) Used to indicate widespread, critical issues that need immediate attention [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
Status: No status
Development

No branches or pull requests

6 participants