WordPress.org

Make WordPress Core

Opened 7 weeks ago

Last modified 7 weeks ago

#52855 new defect (bug)

Block editor sometimes missing some theme_support sections of sidebar

Reported by: 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 (3)

#1 @filmmaker3000
7 weeks 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
7 weeks 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
7 weeks 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.

Note: See TracTickets for help on using tickets.