Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#52855 new defect (bug)

Block editor sometimes missing some theme_support sections of sidebar

Reported by: joyously's profile joyously Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.7
Component: Editor Keywords:
Focuses: Cc:

Description

The block editor is sometimes missing sections in the sidebar related to what the theme supports, like page templates and featured image. It appears that post formats are unaffected, and also wide-blocks (which isn't in the sidebar, but is theme_support related).

According to replies to this forum topic
https://wordpress.org/support/topic/theme-support-for-post-thumbnails-stopped-working-after-upgrading-to-wp-5-7/
it is sometimes a JS error in unrelated code, but sometimes the existence of the theme's index.php file. A few users indicate it must be something else.

Steps to reproduce the effect of index.php:

  1. Using WP 5.6.x, activate a theme that supports featured images, such as Twenty Twenty.
  2. Edit a post or page.
  3. Note that the featured image (or page template) section is in the edit sidebar.
  4. Rename the theme's index.php to testindex.php.
  5. Repeat steps 2 & 3.
  6. Update WP to 5.7.
  7. Edit a post or page.
  8. See that the featured image (or page template) section is missing.

These steps repeated with the Classic editor show no missing sections.

Change History (5)

#1 @filmmaker3000
4 years ago

As noted in the thread, If the theme folder is named 4 numbers in succession (1234), it breaks the theme and causes this theme_supports issue. If you add characters before or after (I added 1234_realtheme and the1234 and both worked. I could reproduce this multiple times in a row with no problem.

#2 @peterwilsoncc
4 years ago

Rename the theme's index.php to testindex.php.

Is this reproducible without renaming the index.php file?

The minimum file requirements for a valid theme are index.php and style.css so the reproduction steps above are creating an invalid theme.

#3 @joyously
4 years ago

Yes, renaming the index.php file is just one way to see the problem. And apparently, some users have done this or they wouldn't have said it was fixed by making sure there was an index.php file. But others have the problem without having changed the index.php file, as noted in comment 1.

This ticket was mentioned in Slack in #forums by figerolab. View the logs.


3 years ago

#5 @commutetour
3 years ago

Hi team,

Thanks for the 5.9 update. Do we have any update on this? It appears that the category list and featured image on the sidebar is missing once you save the post and open it again from the posts page. I am not sure how to go about this so I reverted back to 5.8.3 until a fix is found.

Note: See TracTickets for help on using tickets.