Problem/Motivation
Block alter hooks are not being triggered.
Steps to reproduce
* Create a new SDC that has slots.
* Use the SDC as a pattern block in the block layout page.
* On the SDC pattern block, add a block in the region, for instance the branding block.
* On a custom module, add a block view alter hook.
* Clear cache, confirm the alter hook is not invoked.
* Add the branding block as a standard block on a region.
* Confirm the alter hook is for the standard block.
Proposed resolution
function getPropValue() on ui_patterns/src/Plugin/UiPatterns/Source/BlockSource.php should call the alter implementations.
Remaining tasks
Call the alter hooks as the normal blocks builder do.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3565888-block-source-view-alter.diff | 1.5 KB | alemadlei |
| #3 | 3565888-block-source-view-alter.diff | 657 bytes | alemadlei |
Issue fork ui_patterns-3565888
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
alemadleiThe attached patch should make the build array to be altered by implementations.
Comment #4
alemadleiThis new patch also ensures block templates are used when rendering the block sources.
Comment #5
alemadleiComment #6
alemadleiComment #7
just_like_good_vibesDear alemadlei,
thank you for reaching us and proposing some modifications, but your proposed code has the MR totally red.
please adjust before sending it to review.
thank you
Comment #8
alemadlei@just_like_good_vibes sorry, I see that it ran the checks and I might need to update the test cases to reflect the changes in content. I will proceed to do that.
Thanks for taking your time to check this.