Problem/Motivation
Place a block, but don't submit the block admin form afterwards (or use the experimental Place block module to do it).
The weight of the block is NULL, not 0 in the config, such as:
uuid: d8055768-1043-4b42-9eab-92146e3cc38b
langcode: en
status: true
dependencies:
config:
- views.view.who_s_new
module:
- views
theme:
- bartik
id: views_block__who_s_new_block_1
theme: bartik
region: sidebar_second
weight: null
provider: null
plugin: 'views_block:who_s_new-block_1'
settings:
id: 'views_block:who_s_new-block_1'
label: ''
provider: views
label_display: visible
views_label: ''
items_per_page: none
visibility: { }
Proposed resolution
Add a hidden (or value?) form input to BlockForm with a default of 0 for new blocks. Make sure block form validation checks that it's an integer.
Possibly, add support for query string to set the weight so it's possibly to position a new block relative to other blocks.
Remaining tasks
Write a patch and tests
User interface changes
none
API changes
none
Data model changes
none
Comments
Comment #2
pwolanin commentedtagging
Comment #12
akmalfikri commentedComment #13
akmalfikri commentedI closed this issue because of the decision made in #2739075: [plan] Make Place Blocks module functionality part of the Block module (etc.).
If anyone disagrees, can reopen this issue.
Comment #14
quietone commented@akmalfikri, what is the decision that you are referring to?
Comment #15
akmalfikri commented@quietone,
According to @xjm in https://www.drupal.org/project/drupal/issues/2739075#comment-12184387, they decided to hide the Place Block experimental module. As per what I refer last time, the reporter was using the experimental module to produce the bug. I think the reporter have changed the bug reproducing steps.