core/includes/common.inc | 1 - core/modules/block/lib/Drupal/block/BlockViewBuilder.php | 5 +++-- .../lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php | 2 +- core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/includes/common.inc b/core/includes/common.inc index 2d603e4..6a17040 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -4489,7 +4489,6 @@ function drupal_render_cid_create($elements) { $granularity = isset($elements['#cache']['granularity']) ? $elements['#cache']['granularity'] : NULL; // Merge in additional cache ID parts based provided by drupal_render_cid_parts(). - $cid_parts = array_merge($keys, drupal_render_cid_parts($granularity)); return implode(':', $cid_parts); diff --git a/core/modules/block/lib/Drupal/block/BlockViewBuilder.php b/core/modules/block/lib/Drupal/block/BlockViewBuilder.php index 16572a9..2c04f93 100644 --- a/core/modules/block/lib/Drupal/block/BlockViewBuilder.php +++ b/core/modules/block/lib/Drupal/block/BlockViewBuilder.php @@ -48,7 +48,7 @@ public function viewMultiple(array $entities = array(), $view_mode = 'full', $la $build[$entity_id] = array( '#theme' => 'block', '#weight' => $entity->get('weight'), - '#configuration' => $configuration + array('label' => check_plain($configuration['label'])), + '#configuration' => $configuration, '#plugin_id' => $plugin_id, '#base_plugin_id' => $base_id, '#derivative_plugin_id' => $derivative_id, @@ -61,6 +61,7 @@ public function viewMultiple(array $entities = array(), $view_mode = 'full', $la // @todo Remove after fixing http://drupal.org/node/1989568. '#block' => $entity, ); + $build[$entity_id]['#configuration']['label'] = check_plain($configuration['label']); if ($plugin->isCacheable()) { // Generic cache keys, with the block plugin's custom keys appended @@ -76,7 +77,7 @@ public function viewMultiple(array $entities = array(), $view_mode = 'full', $la array($this, 'buildBlock'), ), '#cache' => array( - 'keys' => $default_cache_keys + $plugin->getCacheKeys(), + 'keys' => array_merge($default_cache_keys, $plugin->getCacheKeys()), 'bin' => $plugin->getCacheBin(), 'tags' => NestedArray::mergeDeep($default_cache_tags, $plugin->getCacheTags()), 'expire' => REQUEST_TIME + $plugin->getCacheMaxAge(), diff --git a/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php b/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php index 08fc35a..ad8dab1 100644 --- a/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php +++ b/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php @@ -32,7 +32,7 @@ public function build() { * {@inheritdoc} */ public function getCacheKeys() { - return array_merge($this->configuration['test_cache_contexts']); + return $this->configuration['test_cache_contexts']; } } diff --git a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php index c35b4a1..7b32708 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php @@ -30,7 +30,7 @@ public function build() { if ($output = $this->view->executeDisplay($this->displayID)) { // Override the label to the dynamic title configured in the view. - if (empty($this->configuration['views_label'])) { + if (empty($this->configuration['views_label']) && $this->view->getTitle()) { $output['#block_label'] = Xss::filterAdmin($this->view->getTitle()); }