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

Blocks with block type fields sharing the same name cause out-of-memory issue #35

Open
nmiyazaki-chapleau opened this issue Jun 11, 2024 · 1 comment

Comments

@nmiyazaki-chapleau
Copy link

Adding a block with a block type field within itself and rendering it using renderBlocks() causes out-of-memory issues.
More specifically, block variables are shared within each layer of blocks. This can happen at any level of depth within blocks.
Example:
We have Block 1 with a field "content" of type blocks and Block 2 with a field "content" of type blocks.

Inserting block 1 inside block 1 -> OOM issue.
Inserting block 2 inside block 1 -> OOM issue.

Renaming Block 1's field "content" to "content_1":

Inserting block 1 inside block 1 -> OOM issue.
Inserting block 2 inside block 1 -> OK.

I believe blocks shouldn't be able to access parent blocks' variables, as it would only lead to unintended consequences such as this one, and I do not see intentionally using parent variables in blocks as a good thing.

I believe this is a known issue, as the columns_two default block forcefully ignores itself as a valid block underneath.

@LukeTowers
Copy link
Member

@bennothommo thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants