diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php index 0094c429613c445d60c4d180d840e310acc2e916..2c9845e28f799fda44509301dd3a92a712c30d4a 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php @@ -210,7 +210,7 @@ public function delete(array $form, array &$form_state) { unset($_GET['destination']); } $block = $this->buildEntity($form, $form_state); - $form_state['redirect'] = array('block/' . $block->uuid->value . '/delete', array('query' => $destination)); + $form_state['redirect'] = array('block/' . $block->id() . '/delete', array('query' => $destination)); } } diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/PageEditTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/PageEditTest.php index 3ba7b0b7a376fd9541c35ad0dfca6cb80cecef5b..04a5a628b15b18e94201b95dc1faf742e176a8a1 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/PageEditTest.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/PageEditTest.php @@ -66,6 +66,11 @@ public function testPageEdit() { // Ensure that the block revision has been created. $revised_block = entity_load('custom_block', $block->id->value, TRUE); $this->assertNotIdentical($block->revision_id->value, $revised_block->revision_id->value, 'A new revision has been created.'); + + // Test deleting the block. + $this->drupalGet("block/" . $revised_block->id() . "/edit"); + $this->drupalPost(NULL, array(), t('Delete')); + $this->assertText(format_string('Are you sure you want to delete !label?', array('!label' => $revised_block->label()))); } }