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

[BUG] - Rendering a block while using manifest defaults results in a fatal error. #447

Open
mbmjertan opened this issue Jan 8, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mbmjertan
Copy link
Collaborator

echo Helpers::render(
						'carousel',
						renderPathName: 'blocks',
						renderContent: $collectedRenders,
						renderUseComponentDefaults: true
					);

This triggers a fatal error because you call getComponent on a block in Helpers::render when renderUseComponentDefaults is true.

		// Merge default attributes with the component attributes.
		if ($renderUseComponentDefaults) {
			$renderAttributes = Helpers::getDefaultRenderAttributes(Helpers::getComponent($renderName), $renderAttributes);
		}

In turn, this makes it unable to render a block while keeping defaults.

IMO this should support blocks as well? They have almost the same manifest

@mbmjertan mbmjertan added the bug Something isn't working label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants