Skip to content

Commit

Permalink
Fixed failing patch for the drupal 9.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
khalima committed Dec 16, 2022
1 parent fade638 commit 01229a9
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php
index e3eaab22e1..f46882c3b0 100644
index 88e6cecb18..6fe4ec4916 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php
@@ -96,7 +96,7 @@ public function testAdministrationPage() {
@@ -105,7 +105,7 @@ public function testAdministrationPage() {

// Test that selecting elements as a part of bulk operations works.
$page->selectFieldOption('Media type', '- Any -');
Expand All @@ -28,10 +28,10 @@ index 9423bb1d64..e85ef75fc6 100644
once('exposed-form', this.$exposed_form).forEach(
$.proxy(this.attachExposedFormAjax, this),
diff --git a/core/modules/views/js/ajax_view.js b/core/modules/views/js/ajax_view.js
index 225836f4f8..2ddec6f650 100644
index d824250714..64fb1e568e 100644
--- a/core/modules/views/js/ajax_view.js
+++ b/core/modules/views/js/ajax_view.js
@@ -66,7 +66,7 @@
@@ -55,7 +55,7 @@
}
};
this.settings = settings;
Expand All @@ -40,7 +40,7 @@ index 225836f4f8..2ddec6f650 100644
once('exposed-form', this.$exposed_form).forEach($.proxy(this.attachExposedFormAjax, this));
once('ajax-pager', this.$view.filter($.proxy(this.filterNestedViews, this))).forEach($.proxy(this.attachPagerAjax, this));
var selfSettings = $.extend({}, this.element_settings, {
@@ -124,4 +124,4 @@
@@ -106,4 +106,4 @@
}, 500);
}
};
Expand Down Expand Up @@ -75,21 +75,21 @@ index bbeb4db276..50eb634674 100644
/** @var \Drupal\views\Plugin\views\exposed_form\ExposedFormPluginInterface $exposed_form_plugin */
$exposed_form_plugin = $view->display_handler->getPlugin('exposed_form');
diff --git a/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php b/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php
index d877277d72..7e9857fa79 100644
index 299964e82d..7e9857fa79 100644
--- a/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php
+++ b/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php
@@ -32,15 +32,17 @@ public function getCacheContexts() {
* context of current view and display ID.
*/
public function build() {
- $output = $this->view->display_handler->viewExposedFormBlocks();
- $output = $this->view->display_handler->viewExposedFormBlocks() ?? [];
+ $output = [];
+ $build = $this->view->display_handler->viewExposedFormBlocks();
// Provide the context for block build and block view alter hooks.
// \Drupal\views\Plugin\Block\ViewsBlock::build() adds the same context in
// \Drupal\views\ViewExecutable::buildRenderable() using
// \Drupal\views\Plugin\views\display\DisplayPluginBase::buildRenderable().
- if (is_array($output) && !empty($output)) {
- if (!empty($output)) {
- $output += [
+ if (is_array($build) && !empty($build)) {
+ $output = [
Expand Down Expand Up @@ -125,18 +125,18 @@ index 5528c4c1fa..11dc0b53ae 100644
+ - 'user.node_grants:view'
+ tags: { }
diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
index f0616d58ab..3b54594e1b 100644
index d231907de9..9ae86ffb29 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
@@ -259,7 +259,6 @@ public function testExposedBlock($display) {
@@ -262,7 +262,6 @@ public function testExposedBlock($display) {
// Test there is only one views exposed form on the page.
$xpath = '//form[@id="' . $this->getExpectedExposedFormId($view) . '"]';
$this->assertSession()->elementsCount('xpath', $xpath, 1);
- $element = $this->assertSession()->elementExists('xpath', $xpath);

// Test that the correct option is selected after form submission.
$this->assertCacheContext('url');
@@ -270,13 +269,14 @@ public function testExposedBlock($display) {
@@ -273,13 +272,14 @@ public function testExposedBlock($display) {
'page' => ['page'],
];
foreach ($arguments as $argument => $bundles) {
Expand All @@ -154,7 +154,7 @@ index f0616d58ab..3b54594e1b 100644
$this->assertNodesExist($arguments['All']);
}

@@ -436,7 +436,7 @@ protected function assertIds(array $ids): void {
@@ -439,7 +439,7 @@ protected function assertIds(array $ids): void {
* The form ID.
*/
protected function getExpectedExposedFormId(ViewExecutable $view) {
Expand Down

0 comments on commit 01229a9

Please sign in to comment.