diff --git a/core/modules/block/lib/Drupal/block/BlockFormController.php b/core/modules/block/lib/Drupal/block/BlockFormController.php index 08abf08..10cc39e 100644 --- a/core/modules/block/lib/Drupal/block/BlockFormController.php +++ b/core/modules/block/lib/Drupal/block/BlockFormController.php @@ -48,7 +48,7 @@ public function form(array $form, array &$form_state) { '#type' => 'machine_name', '#title' => t('Machine name'), '#maxlength' => 64, - '#description' => t('A unique name to save this block configuration. Must be alpha-numeric and be underscore separated.'), + '#description' => t('A unique name for this block instance. Must be alpha-numeric and underscore separated.'), '#default_value' => $entity->id() ?: $machine_default, '#machine_name' => array( 'exists' => 'block_load', diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 0c55544..7dfaed1 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -1663,20 +1663,3 @@ function views_cache_get($cid, $use_language = FALSE) { return cache('views_info')->get($cid); } -/** - * Implements hook_form_FORM_ID_alter for block_form(). - * - * Views overrides block configuration form elements during - * \Drupal\views\Plugin\Block\ViewsBlock::form() but machine_name assignment is - * added later by \Drupal\block\BlockFormController::form() so we provide an - * override for the block machine_name here. - */ -function views_form_block_form_alter(&$form, &$form_state) { - // Ensure the block-form being altered is a Views block configuration form. - if (($form['settings']['module']['#value'] == 'views') && empty($form['machine_name']['#default_value'])) { - // Unset the machine_name provided by BlockFormController. - unset($form['machine_name']['#machine_name']['source']); - // Prevent users from changing the auto-generated block machine_name. - $form['machine_name']['#access'] = FALSE; - } -}