diff --git a/core/lib/Drupal/Core/Entity/FieldableDatabaseStorageController.php b/core/lib/Drupal/Core/Entity/FieldableDatabaseStorageController.php index 370dea6..97c2be7 100644 --- a/core/lib/Drupal/Core/Entity/FieldableDatabaseStorageController.php +++ b/core/lib/Drupal/Core/Entity/FieldableDatabaseStorageController.php @@ -281,9 +281,9 @@ protected function mapFromStorageRecords(array $records, $load_revision = FALSE) $entities = array(); foreach ($records as $id => $record) { $entities[$id] = array(); - // Skip the item delta and item value levels but let the field assign - // the value as suiting. This avoids unnecessary array hierarchies and - // saves memory here. + // Skip the item delta and item value levels (if possible) but let the + // field assign the value as suiting. This avoids unnecessary array + // hierarchies and saves memory here. foreach ($record as $name => $value) { // Handle columns named [field_name]__[column_name] (e.g for field types // that store several properties). @@ -787,9 +787,9 @@ protected function mapToStorageRecord(EntityInterface $entity, $table_key = 'bas foreach (array_keys($multi_column_fields) as $field_name) { $field_items = $entity->get($field_name); $field_value = $field_items->getValue(); - // @todo Reconsider the usage of getFieldPropertyNames() after + // @todo Reconsider the usage of getPropertyDefinitions() after // https://drupal.org/node/2144327. - foreach ($field_items->getFieldDefinition()->getFieldPropertyNames() as $property_name) { + foreach (array_keys($field_items[0]->getPropertyDefinitions()) as $property_name) { if (isset($schema['fields'][$field_name . '__' . $property_name])) { $values[$field_name . '__' . $property_name] = isset($field_value[0][$property_name]) ? $field_value[0][$property_name] : NULL; } diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php index c32e5c4..a91675c 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php @@ -88,7 +88,7 @@ function testTaxonomyTokenReplacement() { $tests = array(); $tests['[term:tid]'] = $term1->id(); $tests['[term:name]'] = check_plain($term1->name->value); - $tests['[term:description]'] = check_markup($term1->description->value, $term1->description->format); + $tests['[term:description]'] = $term1->description->processed; $tests['[term:url]'] = url('taxonomy/term/' . $term1->id(), array('absolute' => TRUE)); $tests['[term:node-count]'] = 0; $tests['[term:parent:name]'] = '[term:parent:name]'; @@ -103,7 +103,7 @@ function testTaxonomyTokenReplacement() { $tests = array(); $tests['[term:tid]'] = $term2->id(); $tests['[term:name]'] = check_plain($term2->name->value); - $tests['[term:description]'] = check_markup($term2->description->value, $term2->description->format); + $tests['[term:description]'] = $term2->description->processed; $tests['[term:url]'] = url('taxonomy/term/' . $term2->id(), array('absolute' => TRUE)); $tests['[term:node-count]'] = 1; $tests['[term:parent:name]'] = check_plain($term1->name->value); diff --git a/core/modules/taxonomy/taxonomy.pages.inc b/core/modules/taxonomy/taxonomy.pages.inc index 310d696..84f9c32 100644 --- a/core/modules/taxonomy/taxonomy.pages.inc +++ b/core/modules/taxonomy/taxonomy.pages.inc @@ -76,7 +76,7 @@ function taxonomy_term_feed(Term $term) { $channel['title'] = \Drupal::config('system.site')->get('name') . ' - ' . $term->label(); // Only display the description if we have a single term, to avoid clutter and confusion. // HTML will be removed from feed description. - $channel['description'] = check_markup($term->description->value, $term->description->format, '', TRUE); + $channel['description'] = $term->description->processed; $nids = taxonomy_select_nodes($term->id(), FALSE, \Drupal::config('system.rss')->get('items.limit')); return node_feed($nids, $channel); diff --git a/core/modules/taxonomy/taxonomy.tokens.inc b/core/modules/taxonomy/taxonomy.tokens.inc index b0286c6..ce77a7c 100644 --- a/core/modules/taxonomy/taxonomy.tokens.inc +++ b/core/modules/taxonomy/taxonomy.tokens.inc @@ -108,7 +108,7 @@ function taxonomy_tokens($type, $tokens, array $data = array(), array $options = break; case 'description': - $replacements[$original] = $sanitize ? check_markup($term->description->value, $term->description->format, '', TRUE) : $term->description->value; + $replacements[$original] = $sanitize ? $term->description->processed : $term->description->value; break; case 'url':