diff --git a/core/modules/block/src/BlockBase.php b/core/modules/block/src/BlockBase.php index c4cc087..9927054 100644 --- a/core/modules/block/src/BlockBase.php +++ b/core/modules/block/src/BlockBase.php @@ -103,6 +103,8 @@ protected function baseConfigurationDefaults() { $visibility = array_map(function ($definition) { return array('id' => $definition['id']); }, $this->conditionPluginManager()->getDefinitions()); + // Exclude conditions that don't apply. + unset($visibility['vocabulary']); return array( 'id' => $this->getPluginId(), 'label' => '', @@ -316,8 +318,6 @@ public function buildConfigurationForm(array $form, array &$form_state) { $form['visibility']['language']['negate']['#value'] = $form['visibility']['language']['negate']['#default_value']; } - unset($form['visibility']['vocabulary']); - // Add plugin-specific settings for this block type. $form += $this->blockForm($form, $form_state); return $form;