-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fatal error: memory exhausted viewing a post containing a core/post-content
block
#27
Comments
This problem was mentioned in WordPress/gutenberg#22080 (comment)
It's not that easy to fix the logic.
then none of the blocks in the content are processed. I had to deal with a problem like this in oik's I imagine that the |
While testing a solution for issue #27 I started changing the |
Yes, it might. But we can also use the But now I'm back on this one and thinking up dastardly tests which will potentially cause recursion problems with I believe there's already been some work done on reusable blocks that go recursive. Here are some scenarios.
|
I checked and got an unexpected result. |
Re: scenario 2.
This problem occurred because I had not yet fixed the problem for the first scenario. I created two identical posts containing a query for the 3 most recent posts. |
For scenario 2. I decided to try to create an easier to understand set of pages which would exhibit the problem, using both SetupPages involved in the test
This is now raised as bobbingwide/oik/issues/166 |
Having developed a fix for bobbingwide/oik#166 I should now be able to recreate the scenario using I'll attempt to recreate and fix the problem using Twenty Twenty-One Blocks and Gutenberg source. BTW: The next stage would be to extend the logic to detect infinite recursion in template parts... assuming that's an issue as well. |
It was easier to use the run time version of Gutenberg to develop a working version. Note: In order to get this output I needed to eliminate the more block from each post's content. |
Well, the Not surprisingly this didn't resolve the problem with the |
|
No I won't. I developed the fix against Gutenberg runtime since it's quicker to develop the code in the build folder rather than wait for it to be rebuilt by But first I'll try to create a problem with recursive template parts. |
That wasn't hard. Now to raise a separate issue as I've realised that it could be more complicated since template parts can get loaded up in a variery of methods at present using: postId, theme and slug. |
… that uses metadates.html, and metadates.html to use [bw_field]
After refactoring I noticed that |
I haven't experienced problems like this for a while. I couldn't be bothered to retest but did revisit my documentation for the post-content block and found it needed updating. I had to correct the I also updated the notes and included the post-content block directly into the post in order to demonstrate that the Fizzie theme implements its own recursion detection. |
A similar problem to #7 occurred when I tried to document the
core/post-content
block.In the editor, the block was displayed as:
On the front end, the logic that attempts to prevent infinite recursion didn't kick in.
The text was updated successfully, but these errors were encountered: