-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Not render block that does not exist #1614
Conversation
@@ -26,7 +26,7 @@ | |||
"doctrine/doctrine-bundle": "^2.5", | |||
"doctrine/persistence": "^2.1 || ^3.0", | |||
"sonata-project/admin-bundle": "^4.15", | |||
"sonata-project/block-bundle": "^4.16.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll be fixed after this PR sonata-project/SonataBlockBundle#1115 pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I need this PR :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b4fd8a3
to
cb75366
Compare
cb75366
to
2527c7e
Compare
I'll expect what gonna be decided in this PR: sonata-project/SonataBlockBundle#1115 |
Hey @VincentLanglet @jordisala1991 |
return ''; | ||
} | ||
|
||
return $this->blockHelper->render($block, $options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can try/catch only the render call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I can do that!
} | ||
|
||
return $this->blockHelper->render($block, $options); | ||
} catch (BlockNotFoundException $exception) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why BlockNotFoundException ?
I thought we introduced a BlockServiceNotFoundException ; you need to catch something else ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's the old exception I need to change!
Not render block that does not exist
I am targeting this branch, because it requires a fix in sonata block bundle 4.x and it's supported only for page bundle 4.
Issue #1609.
Changelog