Closed (fixed)
Project:
Drupal core
Version:
10.1.x-dev
Component:
layout_builder.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Aug 2019 at 11:21 UTC
Updated:
3 Mar 2023 at 12:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kaszarobertI made a patch to increase the possible weight values. Now a wider range can be selected, between -100 to 100.
Comment #3
sam152 commentedWhy don't we count the number of elements we are weighting, to prevent this from ever being an issue in the future?
\Drupal\workflows\Form\WorkflowEditForm::formhas an example of this:Would also be good to test this.
Comment #6
kunalgautam commentedComment #7
kunalgautam commentedPatch for drupal 9.
Comment #8
kunalgautam commentedComment #9
priyanka.sahni commentedComment #10
priyanka.sahni commentedVerified and tested by applying the patch #7.On adding more than 20 blocks in the section , counts accordingly gets increased in the row weights section.It looks good to me.Can be moved to RTBC.RTBC +1.
Steps to test -
1. Go to admin site.
2. Go to /admin/modules.
3. Enable the layout builder and discovery.
4. Go to admin/structure/block/block-content
5. Add custom block.
6. Go to admin/structure/types/manage/article/display/default/layout.
7. In the section , add 34 blocks.Re order it.
8. Click on edit icon in the block , click on move.
9. On the right side , pop-up gets opened , you will see the row weights.
10. Row weights should be according to the blocks added in the section.If block is 34 than -17 to 17 will display in row weights.
Before -

After -

Comment #11
tim.plunkettThe fix looks good, but this needs automated test coverage
Comment #13
longwaveClosed #3208972: Layout Builder MoveBlockForm weight field limited to 20 items. as duplicate.
Comment #16
danflanagan8Here's a fail test. It's pretty simple, but a couple notes...
1. I add 25 blocks to a new section at one point in the test. The test fails on any number over 20.
2. After adding 25 identical blocks, I cannot rely on
assertRegionBlocksOrderbecause that function expects unique blocks.Comment #18
danflanagan8Test failed as expected. Removing tag.
Here's the patch from #7 applied atop the fail patch.
Note that the interdiff includes changes related to running all test now while only running the updated test in #16. Saving energy, time, money, etc.
Comment #21
smustgrave commentedTriggering for 10.1
Comment #22
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.
Change passes 10.1
Issue summary has no more remaining tasks and clear proposed solution.
Fail patch proves this issue.
Comment #24
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!