Make WordPress Core

Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#57193 closed defect (bug) (reported-upstream)

White screen of death in theme editor when blank theme is activated.

Reported by: lamarajan's profile lamarajan Owned by:
Milestone: Priority: high
Severity: critical Version: 6.1.1
Component: Editor Keywords:
Focuses: template Cc:

Description

I am trying to develop a theme for wordpress 6.1.1. When I create a blank theme and included a required file to develop a theme.
https://prnt.sc/hOqIGShQnO1p
But when activated a theme, and click on editor, there is white screen of death. But same theme is working for WordPress 6.1.
Here is style.css settings

https://prnt.sc/ltK7EzjerQNR

Is this a bug or I missed something.

Attachments (1)

testtheme.zip (2.5 KB) - added by lamarajan 20 months ago.
here is the test theme.

Download all attachments as: .zip

Change History (10)

#1 @poena
20 months ago

Hi!
Are you able to share a complete copy of the theme for testing?

#2 @lamarajan
20 months ago

Hello @poena,

I couldn't find button to upload the theme. So I have provide you repo link.
https://github.com/rajanlama786/test-theme-fse

And I am getting this is error in the console.

https://prnt.sc/xbNl5bvaCi3Z

@lamarajan
20 months ago

here is the test theme.

#3 @lamarajan
20 months ago

Hello,

This is the same theme I have tested in 6.1. And here is the screen shot.

https://prnt.sc/3txllXfJjT83

#4 @costdev
20 months ago

  • Component changed from General to Editor
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.1.2
  • Priority changed from normal to high

Issue reproduced with the theme provided above, as well as a simple style.css + templates/index.html theme.


  • Introduced in [54799]. (6.1.1)
  • Milestoning for 6.1.2.
  • Increasing Priority to high.
  • Pinging folks who worked on this to help the ticket move forward: @flixos90, @manuilov, @oandregal, @peterwilsoncc, @spacedmonkey

TL;DR - When a block theme does not have a theme.json file, the editor screen is blank.

Looks like it might be an issue with this condition (removing this early return allows the theme to load), or maybe the changes to ::theme_has_support().

#5 @lamarajan
20 months ago

Hello @costdev,

Thank you for response.
OK, and If theme.json is mandatory, I think theme need to be displayed as broken theme with message. Please Add theme.json.

Regards,
rajan

#6 @costdev
20 months ago

  • Keywords needs-testing needs-patch removed
  • Milestone 6.1.2 deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Hi @lamarajan, theme.json is not mandatory for block themes.

Per WP_Theme::is_block_theme(), the only requirements for a block theme are the existence of a templates/index.html, or for backward compatibility, block-templates/index.html. To clarify, templates/index.html is the recommended one.

This is a regression introduced in 6.1.1.


See GB 46073, which has a patch.

As this has been reported and will be patched upstream in the Gutenberg repository, I'll close this ticket as reported-upstream.

@mamaduka I can't see a milestone in the Gutenberg repo for 6.1.2. Would it be possible to ensure that GB 46073 gets assigned there when the milestone is available?

#7 @lamarajan
20 months ago

Hello @costdev,
Ok thank you.

I hope I have contributed in WordPress Core As well by creating this ticket. I will keep contributing :)

Regards
lamarajan

#8 @Mamaduka
20 months ago

Thanks for the ping, @costdev.

I added the backport label since we don't have a WP 6.1.2 project board yet.

#9 @costdev
20 months ago

@lamarajan Thank you for reporting this issue and please do continue contributing! 🙂

@mamaduka Thanks!

Note: See TracTickets for help on using tickets.