Problem/Motivation
It is not possible to filter the inline blocks available for placement by the section to which a block is being added.
#2973615: Add Section delta as extra data on filtered block definitions added the section delta as $extra data on filtered block definitions for non-inline blocks. However, that patch failed to analogously add the section delta for inline blocks. The intent of #2973615 clearly was to affect all blocks (not just non-inline blocks), but that was not the end result so I categorized this as a bug report.
Steps to reproduce
Try to filter the inline block list using hook_plugin_filter_TYPE__CONSUMER_alter by the section delta, it does not exist in $extra
Proposed resolution
Add the delta for inline blocks too.
Remaining tasks
Add tests
Review patch.
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|
Issue fork drupal-3038981
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:
- 3038981-inline-blocks-missing
changes, plain diff MR !1319
Comments
Comment #2
jdleonardComment #3
jdleonardDoes this need to be fixed in 8.8 before 8.7?
Comment #4
jdleonardComment #5
tim.plunkettThanks for the patch!
This will need automated tests.
And yes, it will have to land in 8.8 first
Comment #6
tim.plunkettComment #11
dpiRerolling for D9
Comment #12
tim.plunkettThis cast isn't needed anymore since the method now specifies
intas a typeComment #13
kapilv commentedAddress #12.
Comment #14
kim.pepperComment #15
rinku jacob 13 commentedpatch #11 successfully applied for drupal 9.3.x dev
Comment #17
dpiCreated MR from previous patches, reroll (merge) to 9.3.x
Comment #19
vikashsoni commented@dpi and @jdleonard Patch not applying in drupal-9.3.x-dev
Comment #20
dpi@vikashsoni I've checked that the patch generated from the MR applies to HEAD of both 9.3 (drupal/core#871c1b7) and 9.4 (drupal/core#1ae88e0) cleanly as of this writing.
Don't use the patch files from this issue, per your screenshot.
Check the doc for how to use patches from MR's.
Comment #24
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
For the the tests requested in #5
Comment #27
acbramley commentedRebased the MR against 11.x. Still needs tests.
The previous issue added these in
LayoutBuilderTest::testLayoutBuilderChooseBlocksAlterComment #28
acbramley commentedwill give the tests a stab
Comment #29
acbramley commentedExtended the existing test coverage (since moved to LayoutBuilderBlocksTest)
Also replaced a few unnecessary HTTP requests with API and accessing the manage layout url directly.
Comment #30
smustgrave commentedSorry not super clear what are the steps to trigger this issue?
Comment #31
acbramley commentedComment #32
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #33
acbramley commentedComment #34
danielvezaThis makes sense to have. Done a review, code changes & test coverage look good. Happy to RTBC.
Comment #35
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #36
acbramley commentedbad bot.
Comment #37
quietone commentedI read the comments and the MR (not a code review) and didn't see anything amiss. I have updated credit.
Comment #39
catchCommitted/pushed to 11.x, thanks!