WordPress / twentytwentytwo

Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.
404 stars 92 forks source link

Featured Image section missing on Posts and Pages #273

Closed mjsdiaz closed 2 years ago

mjsdiaz commented 2 years ago

Describe the bug With WP 5.9-beta1 with Twenty Twenty-Two block theme, and when editing a Post (All Posts > Hello World), I don’t see the section to add the Featured Image in the Post Settings sidebar. If I switch to Twenty Twenty-One, the Featured Image section is there, and if I activate the Gutenberg plugin, the Featured Image section is there in the sidebar.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Posts > All Posts > Hello World (or any other added post)'
  2. Click on 'Settings > Posts sidebar'
  3. Scroll down to 'Featured Image section'
  4. It's not there

Expected behavior Section to add Featured Image should be in the Set post-twenty-twenty-one post-twenty-twenty-two tings sidebar

Screenshots Attached are screenshots of Twenty Twenty-Two and Twenty Twenty-One

Device:

Additional context

lwangdu commented 2 years ago

Same here on the WP 5.9 Bate 1.

kjellr commented 2 years ago

Thanks for the reports! I can confirm. If I add add_theme_support( 'post-thumbnails' ); to the theme, then this works again.

I'm wondering if maybe https://github.com/WordPress/gutenberg/pull/35593 didn't make its way over to core. @youknowriad or @noisysocks, can you confirm?

noisysocks commented 2 years ago

Yes looks like https://github.com/WordPress/gutenberg/pull/35593 was missed while adding the FSE infrastructure to Core. @ockham: Are you able to look into adding that?

paaljoachim commented 2 years ago

Does this have anything to do with it? (Related to TT1 but the same issue might be also for Twenty Twenty Two.) https://github.com/joedolson/my-calendar/issues/197#issuecomment-986306781

"...I assume that block themes don't have current_theme_supports( 'post-thumbnails' ), because that block would be added on demand or something? How does that work? "

kjellr commented 2 years ago

"...I assume that block themes don't have current_theme_supports( 'post-thumbnails' ), because that block would be added on demand or something? How does that work? "

It's possible. That is it's supposed to be added by default for Block Themes but in the Beta it is currently not happening.

lwangdu commented 2 years ago

I have tested with TT1 but the feature images works fine. I think something to do with the TT2 theme.

kjellr commented 2 years ago

Unlike Twenty Twenty-One, Twenty Twenty-Two relies on core opting it in by default. So this will be fixed once https://github.com/WordPress/gutenberg/pull/35593 is migrated into core.

noisysocks commented 2 years ago

I opened https://core.trac.wordpress.org/ticket/54597 to track this.

elbsegler63 commented 2 years ago

it is also missing in Beta 2

kjellr commented 2 years ago

Thanks! I'm going to close this now that it's tracked in https://core.trac.wordpress.org/ticket/54597.