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

Infinite loop when Builder in used inside Builder #159

Closed
enact-on opened this issue May 9, 2024 · 1 comment
Closed

Infinite loop when Builder in used inside Builder #159

enact-on opened this issue May 9, 2024 · 1 comment

Comments

@enact-on
Copy link

enact-on commented May 9, 2024

Hello,
I've been playing around with this awesome package and it does a wonderful job.
I are trying to use this to act like a "Page builder" for simple frontend website.

I want to create column options for the page block, and tried this simple approach, basically to provide PageBuilder itself in the schema. However it goes to infinite loop and throws this error.

Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '512' frames

Anyway to get this issue resolved ? Or maybe another approach to manage the column option.

Here's the code

public static function getBlockSchema(): Block
{
    return Block::make('two-column')
		->columns(2)
        ->schema([
            PageBuilder::make('block1')->label(__('filament-fabricator::page-resource.labels.blocks')),
            PageBuilder::make('block2')->label(__('filament-fabricator::page-resource.labels.blocks')),
        ]);
}
@Z3d0X
Copy link
Owner

Z3d0X commented May 12, 2024

You'd need to manually define the blocks for the nested page builder.

See for an example #36 (comment)

@Z3d0X Z3d0X closed this as completed Jun 9, 2024
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