Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When you add a new block to a region, by selecting the region name while the block is in the Disabled group, the block gets moved to the top of the list of blocks in that region. The block is flagged, as expected, with a yellow marker (telling you that you need to save).
Now click "Save blocks". When the page reloads the block now is at the end of the list of blocks in its region.
You can drag the block to the top and save again, it will stick after this.
Comment | File | Size | Author |
---|---|---|---|
#14 | Screen Shot 2020-10-08 at 8.46.19 am.png | 25.73 KB | pameeela |
Comments
Comment #1
ScoutBaker CreditAttribution: ScoutBaker commentedThis is due to the block weights. If you have javascript disabled, you'll see the weight column just like in D5. I believe that the actual "bug" in this case is displaying the block at the top of the region when you first select the region.
When you set the region to display a block in using the drop-down, the weight of the block is not changed when it is moved to that region. After clicking save, the blocks for a given region are, properly, displayed in weighted order. When you use the drag-and-drop functionality to drag a block to another region, the weights are recalculated automatically in the background to display in the proper order.
Comment #2
lyricnz CreditAttribution: lyricnz commentedThis still happens in Drupal 6. It seems like there are two possible solutions: either update the weight of the newly enabled item, so that it genuinely belongs at the top of the region, or put it into the right place based on its current weight.
The first of those seems like the most reasonable, and should be able to use the existing row-drop code from tabledrag.
Comment #3
lyricnz CreditAttribution: lyricnz commentedThis UI WTF has been around forever.
Short version: on the block management page, if you change the dropdown of a disabled block to a region, it visually appears at the top of that region. However, if you hit save, it appears somewhere else (depending on the block's existing weight setting, which isn't visible).
Comment #4
droplet CreditAttribution: droplet commented#1039666: Placing a block in a region via select dropdown moves it to the top of the region, but it will show at the bottom
Comment #5
askibinski CreditAttribution: askibinski commentedThis still happens in Drupal 8, and this issue is not really a duplicate of #1039666: Placing a block in a region via select dropdown moves it to the top of the region, but it will show at the bottom because that one is about Drupal 7 and also a bit different.
In my case, I place a block using the dropdown in the main content region. The admin interface will show the block at the bottom of the list of other blocks in that region. But after saving and viewing the site, it suddenly is at the top of the region. The admin interface also shows the block at the top of the list after the save action.
Maybe this can be solved together with #2138553: Enhance block instance placement to support drag and drop
Comment #14
pameeela CreditAttribution: pameeela commentedVery happy to report that this works now in D8/9. When you create a new block and place it, it correctly appears at the bottom of the list initially and after save.