From da5183a3b6ba804d023d03331de1bc354924e58e Mon Sep 17 00:00:00 2001 From: Oleh Posyniak Date: Tue, 29 Oct 2019 09:27:24 -0500 Subject: [PATCH 1/2] MAGECLOUD-4448-4449: Deliver core patches --- patches.json | 6 ++++++ ...-21696__fix_broken_pagination_on_ES6__2.3.3.patch | 11 +++++++++++ ...MC-21820__fix_broken_method_chaining__2.3.3.patch | 12 ++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 patches/MC-21696__fix_broken_pagination_on_ES6__2.3.3.patch create mode 100644 patches/MC-21820__fix_broken_method_chaining__2.3.3.patch diff --git a/patches.json b/patches.json index 0a5ec42..835a149 100644 --- a/patches.json +++ b/patches.json @@ -180,6 +180,12 @@ "Re-work consumers to terminate as soon as there is nothing left to process": { "2.2.0 - 2.3.1": "MAGECLOUD-4071__terminate_consumers_if_the_queue_is_empty__2.2.0.patch", "2.3.2 - 2.3.3": "MAGECLOUD-4071__terminate_consumers_if_the_queue_is_empty__2.3.2.patch" + }, + "Catalog Product pagination does not work on Elasticsearch 6.x": { + "2.3.3": "MC-21696__fix_broken_pagination_on_ES6__2.3.3.patch" + }, + "Catalog Product collection method chaining is broken": { + "2.3.3": "MC-21820__fix_broken_method_chaining__2.3.3.patch" } }, "monolog/monolog": { diff --git a/patches/MC-21696__fix_broken_pagination_on_ES6__2.3.3.patch b/patches/MC-21696__fix_broken_pagination_on_ES6__2.3.3.patch new file mode 100644 index 0000000..8c3806a --- /dev/null +++ b/patches/MC-21696__fix_broken_pagination_on_ES6__2.3.3.patch @@ -0,0 +1,11 @@ +diff -Naur a/vendor/magento/module-elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchResultApplier.php b/vendor/magento/module-elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchResultApplier.php +--- a/vendor/magento/module-elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchResultApplier.php ++++ b/vendor/magento/module-elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchResultApplier.php +@@ -50,6 +50,7 @@ class SearchResultApplier implements SearchResultApplierInterface + foreach ($this->searchResult->getItems() as $item) { + $ids[] = (int)$item->getId(); + } ++ $this->collection->setPageSize(null); + $this->collection->getSelect()->where('e.entity_id IN (?)', $ids); + $orderList = join(',', $ids); + $this->collection->getSelect()->reset(\Magento\Framework\DB\Select::ORDER); diff --git a/patches/MC-21820__fix_broken_method_chaining__2.3.3.patch b/patches/MC-21820__fix_broken_method_chaining__2.3.3.patch new file mode 100644 index 0000000..7c51043 --- /dev/null +++ b/patches/MC-21820__fix_broken_method_chaining__2.3.3.patch @@ -0,0 +1,12 @@ +diff -Naur a/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php b/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php +--- a/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php ++++ b/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php +@@ -1584,6 +1584,8 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Collection\Abstrac + } else { + return parent::addAttributeToFilter($attribute, $condition, $joinType); + } ++ ++ return $this; + } + + /** From 84ac6f31509bc53894c416e0e6825539d27110f3 Mon Sep 17 00:00:00 2001 From: Oleh Posyniak Date: Thu, 31 Oct 2019 11:00:37 -0500 Subject: [PATCH 2/2] MAGECLOUD-4448-4449: Deliver core patches --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5975081..fbf184e 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Provides critical fixes for Magento 2 Enterprise Edition", "type": "magento2-component", "version": "1.0.0", - "license": "OSL-3", + "license": "OSL-3.0", "require": { "php": "^7.0", "ext-json": "*",