diff --git a/core/modules/block/src/BlockForm.php b/core/modules/block/src/BlockForm.php index fd44cf0..25bd87b 100644 --- a/core/modules/block/src/BlockForm.php +++ b/core/modules/block/src/BlockForm.php @@ -210,7 +210,7 @@ protected function buildVisibilityInterface(array $form, FormStateInterface $for } // Don't display the language condition until we have multiple languages. if ($condition_id == 'language' && !$this->language->isMultilingual()) { - continue; + //continue; } /** @var \Drupal\Core\Condition\ConditionInterface $condition */ $condition = $this->manager->createInstance($condition_id, isset($visibility[$condition_id]) ? $visibility[$condition_id] : []); diff --git a/core/modules/block/src/Tests/BlockLanguageTest.php b/core/modules/block/src/Tests/BlockLanguageTest.php index 7c6e637..3efb3e7 100644 --- a/core/modules/block/src/Tests/BlockLanguageTest.php +++ b/core/modules/block/src/Tests/BlockLanguageTest.php @@ -108,6 +108,12 @@ public function testLanguageBlockVisibilityLanguageDelete() { $block = Block::load($block->id()); $visibility = $block->getVisibility(); $this->assertTrue(empty($visibility['language']['langcodes']['fr']), 'Language is no longer not set in the block configuration after deleting the block.'); + + // Ensure that the block visibility for language is gone from the UI. + $this->drupalGet('admin/structure/block'); + $this->clickLink('Configure'); + $elements = $this->xpath('//details[@id="edit-visibility-language"]'); + $this->assertTrue(empty($elements)); } /**