-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
FSE: Adding a post content block to a post causes a WSOD #22080
Comments
I ran into this under different conditions, but also with the Once I switched to For reference: Preconditions
Steps to reproduce
|
For the last two days I have tried to test with the master but the recent changes to templates broke something with FSE so no templates are found. With Gutenberg version 8.1.0 I am a not seeing a WSOD but the following: On the front, viewing my single template created in the site editor: In the standard block editor, trying to view an already saved post with a post content block:
In the Site editor, the single template shows the placeholder for the content correctly. |
I am seeing the same thing here as @carolinan today on Just noting one difference in my case: I am adding it to a |
I'm seeing this block crash in 8.4 too — originally opened #23429 to report it before seeing this issue. It currently appears to break before I can add the block to the page. To reproduce:
For me it's just freezing the whole page after that, but @jffng tried it and it gave him this error: |
We shouldn't allow adding "post content" inside "post content", that's obviously an infinite loop. We'd need to find a way to exclude this block from the regular post/page editor. |
Or show it as a placeholder? |
A placeholder means there's content that will be added there later and in this case, we can't add anything there, so I'd prefer to just disable the block but not sure exactly how |
The reason why one wants to add a content block in the editor is because is tedious to test block layouts using the HTML files. We need something to represent the content, to build a full page layout around it. So for me it's not as much adding something later, as it is show me that something will be displayed on the front. Because the site editor has been in various states of broken, this early on, it has not been the first place to go to when testing templates, the standard block editor has. Once the site editor is more stable, this pattern for testing and generating block grammar will perhaps change. |
I understand and that makes sense but I believe it's better for us to focus on fixing the site editor issues instead of introducing this temporary measure? How far are we from being able to start building templates directly in the Site Builder? |
Is this still happening on master? There's been a lot of related changes recently. @ockham @Addison-Stavlo @noahtallen |
@epiqueras - I just tested it on my local environment and that seems to be the case. It crashes when added in the post editor ( for posts, pages, Templates, etc.). |
I agree with @youknowriad that we should remove the Post Content block from the Post Editor when editing post content, but it should be okay to add it when editing a Template or Template Part (in the Post Editor) I guess? Though a point can be made that that's also not a totally well-defined scenario. @carolinan Have you tried the Site Editor for editing templates lately? Would be curious if it's working better for you now, or if there are some remaining big blockers? |
We need to hardcode a set of post types for which the post content block should always only show a placeholder to avoid infinite looping in the editor. |
This still happens when creating an FSE template btw, it's not limited to posts/pages. I'd expect it to work in the context of a |
we need to circle back to this PR: #24010, which shows a "placeholder" instead of crashing the editor in that scenario :) |
This should be fixed now! |
confirmed fix 👍 |
Describe the bug
With full site editing enabled, it is possible to add a post content block to a post.
This causes a WSOD on the front.
In the console of the editor I see the following error:
Chrome:
In the console of the front I see the following error:
Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
Firefox:
Refuses to load the post at all.
To reproduce
Steps to reproduce the behavior:
1.Enable full site editing
2. Create a new post in the regular block editor
3. Add a post content block and save
4. View the post on the front
Expected behavior
Posts should not be able to include themselves, I would assume it causes a infinite loop.
I am not sure what the solution would be:
Either disable the block in the post editor,
Or displaying a placeholder explaining that en error occurred (only visible to user with the correct privileges).
Editor version (please complete the following information):
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: