diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 446c856..695018c 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -321,7 +321,7 @@ function comment_form_field_ui_field_storage_add_form_alter(&$form, FormStateInt } if (!_comment_entity_uses_integer_id($form_state->get('entity_type_id'))) { // You cannot use comment fields on entity types with non-integer IDs. - unset($form['add']['new_storage_type']['#options']['comment']); + unset($form['add']['new_storage_type']['#options'][t('General')]['comment']); } } diff --git a/core/modules/simpletest/src/AssertContentTrait.php b/core/modules/simpletest/src/AssertContentTrait.php index e114ebf..42ac01b 100644 --- a/core/modules/simpletest/src/AssertContentTrait.php +++ b/core/modules/simpletest/src/AssertContentTrait.php @@ -1127,7 +1127,7 @@ protected function assertNoFieldChecked($id, $message = '', $group = 'Browser') * TRUE on pass, FALSE on fail. */ protected function assertOption($id, $option, $message = '', $group = 'Browser') { - $options = $this->xpath('//select[@id=:id]/option[@value=:option]', array(':id' => $id, ':option' => $option)); + $options = $this->xpath('//select[@id=:id]//option[@value=:option]', array(':id' => $id, ':option' => $option)); return $this->assertTrue(isset($options[0]), $message ? $message : String::format('Option @option for field @id exists.', array('@option' => $option, '@id' => $id)), $group); } @@ -1153,7 +1153,7 @@ protected function assertOption($id, $option, $message = '', $group = 'Browser') */ protected function assertNoOption($id, $option, $message = '', $group = 'Browser') { $selects = $this->xpath('//select[@id=:id]', array(':id' => $id)); - $options = $this->xpath('//select[@id=:id]/option[@value=:option]', array(':id' => $id, ':option' => $option)); + $options = $this->xpath('//select[@id=:id]//option[@value=:option]', array(':id' => $id, ':option' => $option)); return $this->assertTrue(isset($selects[0]) && !isset($options[0]), $message ? $message : String::format('Option @option for field @id does not exist.', array('@option' => $option, '@id' => $id)), $group); }