SonataBlockBundle
SonataBlockBundle copied to clipboard
Fix init of block settings
trafficstars
Subject
This is a bug fix for the usage without the page bundle.
{{ sonata_block_render({ 'type': 'sonata.media.block.gallery' }, {
// ...
"galleryId": 2
}) }}
When passing a block definition $meta array to this method, the $settings will be ignored for this block itself, they are only passed to the block context. This will result in a null value for different blocks (e.g. https://github.com/sonata-project/SonataMediaBundle/blob/9946d8ac3e0f21f1198050e5f7501766b058e53a/src/Block/GalleryBlockService.php#L169).
I am targeting this branch, because this is a patch.
Changelog
### Fixed
- Fix init of block settings
@jordisala1991 You worked a little with blocks when upgrading SonataPageBundle, you might know this better than me
Friednly ping @jordisala1991