From bd7cce7b2ccbd231112a9cfc06231d3f96e2eb48 Mon Sep 17 00:00:00 2001 From: amotorny Date: Fri, 25 Nov 2022 12:53:22 +0300 Subject: [PATCH] add readme content, correct licence and dependency --- .../SearchResultApplier/Mage245Fix.php | 1 + README.md | 18 +++++++++++++++++- composer.json | 5 ++--- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Model/ResourceModel/Fulltext/Collection/SearchResultApplier/Mage245Fix.php b/Model/ResourceModel/Fulltext/Collection/SearchResultApplier/Mage245Fix.php index 87f3963..ba70901 100644 --- a/Model/ResourceModel/Fulltext/Collection/SearchResultApplier/Mage245Fix.php +++ b/Model/ResourceModel/Fulltext/Collection/SearchResultApplier/Mage245Fix.php @@ -9,6 +9,7 @@ use Magento\Framework\Data\Collection; /** + * fix magento issue: https://github.com/magento/magento2/issues/35918 * Correction of strong typing and table prefixes. Our categorical filter can be a multiselect, and therefore we * always set the array to the filter category, and magneto in this class in the private method * categoryProductByCustomSortOrder strongly types the value from the filter as int, which causes an error. diff --git a/README.md b/README.md index b3ba123..fdadf10 100644 --- a/README.md +++ b/README.md @@ -1 +1,17 @@ -# module-mage-2.4.5-fix +After upgrade Magento to version 2.4.5 you can see this error: +TypeError: Magento\Elasticsearch\Model\ResourceModel\Fulltext\Collection\SearchResultApplier::categoryProductByCustomSortOrder(): Argument #1 ($categoryId) must be of type int, array given + + +This bug is related to the latest Magento changes and custom extensions like Amasty Improved Layered Navigation. + +To see more information + +https://github.com/magento/magento2/issues/35918 + + +If you are Amasty customer, you can fix this error by installing additional package from our private repository: + +composer require amasty/module-mage-2.4.5-fix + + +But this case can be reproduced without our extension. This is why we made this package public. diff --git a/composer.json b/composer.json index 30e0da9..dc855bd 100644 --- a/composer.json +++ b/composer.json @@ -4,14 +4,13 @@ "require": { "php": ">=7.3", "magento/framework": ">=103.0.5", - "magento/module-catalog-inventory": ">=100.4.5", - "amasty/base": ">=1.14.2" + "magento/module-catalog-inventory": ">=100.4.5" }, "homepage": "https://amasty.com/", "type": "magento2-module", "version": "1.0.2", "license": [ - "Commercial" + "proprietary" ], "autoload": { "files": [