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

Site Editor: The static homepage with the Front Page template that doesn't have the post content displays nothing #53264

Closed
arthur791004 opened this issue Aug 2, 2023 · 8 comments
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing")

Comments

@arthur791004
Copy link
Contributor

arthur791004 commented Aug 2, 2023

Description

Referring to Automattic/wp-calypso#79224, the site editor might display nothing when

  1. The “Your homepage displays” setting is configured to a static page
  2. The theme has a front-page.html or the user created a front-page template
  3. The front-page template contains only patterns

The reason is the registered patterns/blocks are filtered out via the canInsertBlockType function because the block editing mode is disabled, and it's disabled due to useDisableNonPageContentBlocks

Step-by-step reproduction instructions

  1. Install and activate the themes below
  1. Go to Settings > Reading, and configure “Your homepage displays” to a static page
  2. Go to Appearance > Editor
  3. Ensure the preview displays nothing

Screenshots, screen recording, code snippet

image

Environment info

The latest trunk on 2 Aug

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

@arthur791004 arthur791004 changed the title Site Editor: The static homepage with the Front Page template that includes only patterns display nothing Site Editor: The static homepage with the Front Page template that doesn't have the post content displays nothing Aug 2, 2023
@Mamaduka
Copy link
Member

Mamaduka commented Aug 2, 2023

I think this was fixed in #53169. The fix will ship with Gutenberg 16.4.

@Mamaduka Mamaduka added [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Aug 2, 2023
@annezazu
Copy link
Contributor

annezazu commented Aug 2, 2023

This seems to match what was reported here by @wpsoul #52388 (comment)

@tellthemachines
Copy link
Contributor

Install and activate the Kigen theme

@arthur791004 that theme doesn't seem to be available in the WP theme directory. Could you share it as a zipped folder or, alternatively, point to a publicly accessible theme where the issue can be reproduced? You could also create a dummy theme with just the minimal code required to reproduce.

@arthur791004
Copy link
Contributor Author

@arthur791004
Copy link
Contributor Author

I think this was fixed in #53169. The fix will ship with Gutenberg 16.4.

I guess it's slightly different since I tested it using the latest trunk yesterday and the issue is still there 🤔

@tellthemachines
Copy link
Contributor

Thanks!

I can't reproduce the issue on the latest Gutenberg trunk or on WP 6.3 RC3 with the Kigen theme:

Screenshot 2023-08-03 at 4 26 35 pm

Could you try testing also on WP 6.3 RC without Gutenberg enabled?

@arthur791004
Copy link
Contributor Author

arthur791004 commented Aug 3, 2023

I tried again and it works now.

  • With Gutenberg 16.3.0, the site editor displays nothing
  • With Gutenberg built from the latest trunk, the site editor displays it correctly!

So, I expect this issue would be resolved with Gutenberg 16.4.0 🎉

@tellthemachines
Copy link
Contributor

Thanks for checking! Closing as fixed by #53169.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing")
Projects
None yet
Development

No branches or pull requests

4 participants