-
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 trying to edit a wp_template #7
Comments
Problem analysisTrace file analysisThe current filter stack is getting deeper and deeper:
The repeated calls in the stack are where the template-part called Datatemplate: single
I tried to use phpMyAdmin to see the content of all the posts with post_type Aside: |
template_part
The only post that refers to postId 548 is the
I can't see why this is being processed. |
There is another post that references postId 548; it's 715 which is an autosaved revision of the
This is being processed in When I remove the |
In packages/block-library/src/post-content/edit.js there's a comment that says The code tests:
We probably need something in the server to do the same thing. |
So far I've found a couple of ways to stop the infinite recursion. In This was a core hack, so I looked for an alternative solution to implement the fix in Gutenberg. In This avoids calling This fix doesn't seem to adversely affect the Revisions dialog. I also noted that in |
Looking at the logic to render the post-content block in
This worked too. It didn't seem necessary to run isset as both 'postId' and 'postType' are set at the same time in I think it makes more sense to fix the block that's failing rather than the calling routine. |
Having developed a local fix and an issue against Gutenberg I could consider closing this. But I'm not going to until it's actually been fixed in Gutenberg. Meanwhile, since I've not implemented it in a committed branch, I'll have to reapply my fix for each new version of Gutenberg. |
I haven't suffered a recursion problem for a while. This is probably due to not testing for it. Closing. |
I'm going to raise this as a separate issue to see if this is something I've done or a problem with Gutenberg itself.
Originally posted by @bobbingwide in #1 (comment)
Problem
With oik-bwtrace activated I got
The trace log file was 364MB. The call stack at the end of the trace file was 3647 functions deep.
The text was updated successfully, but these errors were encountered: