Skip to content

Commit

Permalink
1.1.19 Release (#101)
Browse files Browse the repository at this point in the history
* 1.1.19 Release

* 1.1.19 Release
 - Removed ACSD-44685 patch
 - Updated patches-info.json
  • Loading branch information
agorbivskyi authored Aug 24, 2022
1 parent 7a3bd00 commit 2d29ccc
Show file tree
Hide file tree
Showing 14 changed files with 1,784 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/quality-patches",
"description": "Provides quality patches for AdobeCommerce & Magento OpenSource",
"type": "magento2-component",
"version": "1.1.18",
"version": "1.1.19",
"license": "proprietary",
"repositories": {
"repo": {
Expand Down
2 changes: 1 addition & 1 deletion patches-info.json

Large diffs are not rendered by default.

263 changes: 263 additions & 0 deletions patches/os/ACSD-45781_2.4.1-p1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
diff --git a/vendor/magento/module-search/ViewModel/ConfigProvider.php b/vendor/magento/module-search/ViewModel/ConfigProvider.php
index be3366e62e9..b1db5b57e13 100644
--- a/vendor/magento/module-search/ViewModel/ConfigProvider.php
+++ b/vendor/magento/module-search/ViewModel/ConfigProvider.php
@@ -10,6 +10,7 @@ namespace Magento\Search\ViewModel;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\View\Element\Block\ArgumentInterface;
use Magento\Store\Model\ScopeInterface;
+use Magento\Search\Helper\Data as SearchHelper;

/**
* View model for search
@@ -26,13 +27,31 @@ class ConfigProvider implements ArgumentInterface
*/
private $scopeConfig;

+ /**
+ * @var SearchHelper
+ */
+ private $searchHelper;
+
/**
* @param ScopeConfigInterface $scopeConfig
+ * @param SearchHelper $searchHelper
*/
public function __construct(
- ScopeConfigInterface $scopeConfig
+ ScopeConfigInterface $scopeConfig,
+ SearchHelper $searchHelper
) {
$this->scopeConfig = $scopeConfig;
+ $this->searchHelper = $searchHelper;
+ }
+
+ /**
+ * Retrieve search helper instance for template view
+ *
+ * @return SearchHelper
+ */
+ public function getSearchHelperData(): SearchHelper
+ {
+ return $this->searchHelper;
}

/**
diff --git a/vendor/magento/module-search/view/frontend/templates/form.mini.phtml b/vendor/magento/module-search/view/frontend/templates/form.mini.phtml
index 80e720e2c2f..c6b2a6a7295 100644
--- a/vendor/magento/module-search/view/frontend/templates/form.mini.phtml
+++ b/vendor/magento/module-search/view/frontend/templates/form.mini.phtml
@@ -4,40 +4,42 @@
* See COPYING.txt for license details.
*/

-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
?>
<?php
/** @var $block \Magento\Framework\View\Element\Template */
-/** @var $helper \Magento\Search\Helper\Data */
+/** @var $escaper \Magento\Framework\Escaper */
/** @var $configProvider \Magento\Search\ViewModel\ConfigProvider */
-$helper = $this->helper(\Magento\Search\Helper\Data::class);
$configProvider = $block->getData('configProvider');
+/** @var $helper \Magento\Search\Helper\Data */
+$helper = $configProvider->getSearchHelperData();
+$allowedSuggestion = $configProvider->isSuggestionsAllowed();
+$quickSearchUrl = $allowedSuggestion ? $escaper->escapeUrl($helper->getSuggestUrl()) : '';
?>
<div class="block block-search">
- <div class="block block-title"><strong><?= $block->escapeHtml(__('Search')) ?></strong></div>
+ <div class="block block-title"><strong><?= $escaper->escapeHtml(__('Search')) ?></strong></div>
<div class="block block-content">
<form class="form minisearch" id="search_mini_form"
- action="<?= $block->escapeUrl($helper->getResultUrl()) ?>" method="get">
+ action="<?= $escaper->escapeUrl($helper->getResultUrl()) ?>" method="get">
<div class="field search">
<label class="label" for="search" data-role="minisearch-label">
- <span><?= $block->escapeHtml(__('Search')) ?></span>
+ <span><?= $escaper->escapeHtml(__('Search')) ?></span>
</label>
<div class="control">
<input id="search"
- <?php if ($configProvider->isSuggestionsAllowed()):?>
- data-mage-init='{"quickSearch":{
- "formSelector":"#search_mini_form",
- "url":"<?= $block->escapeUrl($helper->getSuggestUrl())?>",
- "destinationSelector":"#search_autocomplete",
- "minSearchLength":"<?= $block->escapeHtml($helper->getMinQueryLength()) ?>"}
- }'
- <?php endif;?>
+ data-mage-init='{
+ "quickSearch": {
+ "formSelector": "#search_mini_form",
+ "url": "<?= /* @noEscape */ $quickSearchUrl ?>",
+ "destinationSelector": "#search_autocomplete",
+ "minSearchLength": "<?= $escaper->escapeHtml($helper->getMinQueryLength()) ?>"
+ }
+ }'
type="text"
- name="<?= $block->escapeHtmlAttr($helper->getQueryParamName()) ?>"
+ name="<?= $escaper->escapeHtmlAttr($helper->getQueryParamName()) ?>"
value="<?= /* @noEscape */ $helper->getEscapedQueryText() ?>"
- placeholder="<?= $block->escapeHtmlAttr(__('Search entire store here...')) ?>"
+ placeholder="<?= $escaper->escapeHtmlAttr(__('Search entire store here...')) ?>"
class="input-text"
- maxlength="<?= $block->escapeHtmlAttr($helper->getMaxQueryLength()) ?>"
+ maxlength="<?= $escaper->escapeHtmlAttr($helper->getMaxQueryLength()) ?>"
role="combobox"
aria-haspopup="false"
aria-autocomplete="both"
@@ -49,11 +51,11 @@ $configProvider = $block->getData('configProvider');
</div>
<div class="actions">
<button type="submit"
- title="<?= $block->escapeHtml(__('Search')) ?>"
- class="action search"
- aria-label="Search"
+ title="<?= $escaper->escapeHtml(__('Search')) ?>"
+ class="action search"
+ aria-label="Search"
>
- <span><?= $block->escapeHtml(__('Search')) ?></span>
+ <span><?= $escaper->escapeHtml(__('Search')) ?></span>
</button>
</div>
</form>
diff --git a/vendor/magento/module-search/view/frontend/web/js/form-mini.js b/vendor/magento/module-search/view/frontend/web/js/form-mini.js
index b4493c5f380..605c2fbbf9b 100644
--- a/vendor/magento/module-search/view/frontend/web/js/form-mini.js
+++ b/vendor/magento/module-search/view/frontend/web/js/form-mini.js
@@ -35,12 +35,12 @@ define([
selectClass: 'selected',
template:
'<li class="<%- data.row_class %>" id="qs-option-<%- data.index %>" role="option">' +
- '<span class="qs-option-name">' +
- ' <%- data.title %>' +
- '</span>' +
- '<span aria-hidden="true" class="amount">' +
- '<%- data.num_results %>' +
- '</span>' +
+ '<span class="qs-option-name">' +
+ ' <%- data.title %>' +
+ '</span>' +
+ '<span aria-hidden="true" class="amount">' +
+ '<%- data.num_results %>' +
+ '</span>' +
'</li>',
submitBtn: 'button[type="submit"]',
searchLabel: '[data-role=minisearch-label]',
@@ -297,60 +297,64 @@ define([
this.submitBtn.disabled = isEmpty(value);

if (value.length >= parseInt(this.options.minSearchLength, 10)) {
- $.getJSON(this.options.url, {
- q: value
- }, $.proxy(function (data) {
- if (data.length) {
- $.each(data, function (index, element) {
- var html;
-
- element.index = index;
- html = template({
- data: element
+ this.submitBtn.disabled = false;
+
+ if (this.options.url !== '') { //eslint-disable-line eqeqeq
+ $.getJSON(this.options.url, {
+ q: value
+ }, $.proxy(function (data) {
+ if (data.length) {
+ $.each(data, function (index, element) {
+ var html;
+
+ element.index = index;
+ html = template({
+ data: element
+ });
+ dropdown.append(html);
});
- dropdown.append(html);
- });

- this._resetResponseList(true);
-
- this.responseList.indexList = this.autoComplete.html(dropdown)
- .css(clonePosition)
- .show()
- .find(this.options.responseFieldElements + ':visible');
-
- this.element.removeAttr('aria-activedescendant');
-
- if (this.responseList.indexList.length) {
- this._updateAriaHasPopup(true);
+ this._resetResponseList(true);
+
+ this.responseList.indexList = this.autoComplete.html(dropdown)
+ .css(clonePosition)
+ .show()
+ .find(this.options.responseFieldElements + ':visible');
+
+ this.element.removeAttr('aria-activedescendant');
+
+ if (this.responseList.indexList.length) {
+ this._updateAriaHasPopup(true);
+ } else {
+ this._updateAriaHasPopup(false);
+ }
+
+ this.responseList.indexList
+ .on('click', function (e) {
+ this.responseList.selected = $(e.currentTarget);
+ this.searchForm.trigger('submit');
+ }.bind(this))
+ .on('mouseenter mouseleave', function (e) {
+ this.responseList.indexList.removeClass(this.options.selectClass);
+ $(e.target).addClass(this.options.selectClass);
+ this.responseList.selected = $(e.target);
+ this.element.attr('aria-activedescendant', $(e.target).attr('id'));
+ }.bind(this))
+ .on('mouseout', function (e) {
+ if (!this._getLastElement() &&
+ this._getLastElement().hasClass(this.options.selectClass)) {
+ $(e.target).removeClass(this.options.selectClass);
+ this._resetResponseList(false);
+ }
+ }.bind(this));
} else {
+ this._resetResponseList(true);
+ this.autoComplete.hide();
this._updateAriaHasPopup(false);
+ this.element.removeAttr('aria-activedescendant');
}
-
- this.responseList.indexList
- .on('click', function (e) {
- this.responseList.selected = $(e.currentTarget);
- this.searchForm.trigger('submit');
- }.bind(this))
- .on('mouseenter mouseleave', function (e) {
- this.responseList.indexList.removeClass(this.options.selectClass);
- $(e.target).addClass(this.options.selectClass);
- this.responseList.selected = $(e.target);
- this.element.attr('aria-activedescendant', $(e.target).attr('id'));
- }.bind(this))
- .on('mouseout', function (e) {
- if (!this._getLastElement() &&
- this._getLastElement().hasClass(this.options.selectClass)) {
- $(e.target).removeClass(this.options.selectClass);
- this._resetResponseList(false);
- }
- }.bind(this));
- } else {
- this._resetResponseList(true);
- this.autoComplete.hide();
- this._updateAriaHasPopup(false);
- this.element.removeAttr('aria-activedescendant');
- }
- }, this));
+ }, this));
+ }
} else {
this._resetResponseList(true);
this.autoComplete.hide();

49 changes: 49 additions & 0 deletions patches/os/ACSD-46161_2.4.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
diff --git a/vendor/magento/module-paypal/Controller/Transparent/Response.php b/vendor/magento/module-paypal/Controller/Transparent/Response.php
index efb38cd625c..cf5be0fcbad 100644
--- a/vendor/magento/module-paypal/Controller/Transparent/Response.php
+++ b/vendor/magento/module-paypal/Controller/Transparent/Response.php
@@ -18,7 +18,7 @@ use Magento\Paypal\Model\Payflow\Service\Response\Transaction;
use Magento\Paypal\Model\Payflow\Service\Response\Validator\ResponseValidator;
use Magento\Paypal\Model\Payflow\Transparent;
use Magento\Sales\Api\PaymentFailuresInterface;
-use Magento\Checkout\Model\Session;
+use Magento\Framework\Session\SessionManager as Session;
use Magento\Framework\App\Action\HttpPostActionInterface;

/**
@@ -28,8 +28,6 @@ use Magento\Framework\App\Action\HttpPostActionInterface;
class Response extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpPostActionInterface
{
/**
- * Core registry
- *
* @var Registry
*/
private $coreRegistry;
diff --git a/vendor/magento/module-paypal/etc/adminhtml/di.xml b/vendor/magento/module-paypal/etc/adminhtml/di.xml
index fea0a45ae68..53610731e78 100644
--- a/vendor/magento/module-paypal/etc/adminhtml/di.xml
+++ b/vendor/magento/module-paypal/etc/adminhtml/di.xml
@@ -74,4 +74,9 @@
</argument>
</arguments>
</type>
+ <type name="Magento\Paypal\Controller\Adminhtml\Transparent\Response">
+ <arguments>
+ <argument name="sessionTransparent" xsi:type="object">Magento\Framework\Session\Generic</argument>
+ </arguments>
+ </type>
</config>
diff --git a/vendor/magento/module-paypal/etc/di.xml b/vendor/magento/module-paypal/etc/di.xml
index 9ea451a213a..0bda87ded5d 100644
--- a/vendor/magento/module-paypal/etc/di.xml
+++ b/vendor/magento/module-paypal/etc/di.xml
@@ -149,6 +149,7 @@
<type name="Magento\Paypal\Controller\Transparent\Response">
<arguments>
<argument name="responseValidator" xsi:type="object">Magento\Paypal\Model\Payflow\Service\Response\Validator\ResponseValidatorInController</argument>
+ <argument name="sessionTransparent" xsi:type="object">Magento\Checkout\Model\Session</argument>
</arguments>
</type>


54 changes: 54 additions & 0 deletions patches/os/ACSD-46190_2.4.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
diff --git a/vendor/magento/module-catalog-url-rewrite/Model/Products/AdaptUrlRewritesToVisibilityAttribute.php b/vendor/magento/module-catalog-url-rewrite/Model/Products/AdaptUrlRewritesToVisibilityAttribute.php
index f5851cf1e11..d329bdf0200 100644
--- a/vendor/magento/module-catalog-url-rewrite/Model/Products/AdaptUrlRewritesToVisibilityAttribute.php
+++ b/vendor/magento/module-catalog-url-rewrite/Model/Products/AdaptUrlRewritesToVisibilityAttribute.php
@@ -65,11 +65,12 @@ class AdaptUrlRewritesToVisibilityAttribute
*
* @param array $productIds
* @param int $visibility
+ * @param int $storeId
* @throws UrlAlreadyExistsException
*/
- public function execute(array $productIds, int $visibility): void
+ public function execute(array $productIds, int $visibility, int $storeId): void
{
- $products = $this->getProductsByIds($productIds);
+ $products = $this->getProductsByIds($productIds, $storeId);

/** @var Product $product */
foreach ($products as $product) {
@@ -110,11 +111,13 @@ class AdaptUrlRewritesToVisibilityAttribute
* Get Product Models by Id's
*
* @param array $productIds
+ * @param int $storeId
* @return array
*/
- private function getProductsByIds(array $productIds): array
+ private function getProductsByIds(array $productIds, int $storeId): array
{
$productCollection = $this->productCollectionFactory->create();
+ $productCollection->setStoreId($storeId);
$productCollection->addAttributeToSelect(ProductInterface::VISIBILITY);
$productCollection->addAttributeToSelect('url_key');
$productCollection->addFieldToFilter(
diff --git a/vendor/magento/module-catalog-url-rewrite/Observer/ProcessUrlRewriteOnChangeProductVisibilityObserver.php b/vendor/magento/module-catalog-url-rewrite/Observer/ProcessUrlRewriteOnChangeProductVisibilityObserver.php
index 2337bb3646b..cd6350bfce1 100644
--- a/vendor/magento/module-catalog-url-rewrite/Observer/ProcessUrlRewriteOnChangeProductVisibilityObserver.php
+++ b/vendor/magento/module-catalog-url-rewrite/Observer/ProcessUrlRewriteOnChangeProductVisibilityObserver.php
@@ -43,12 +43,13 @@ class ProcessUrlRewriteOnChangeProductVisibilityObserver implements ObserverInte
$event = $observer->getEvent();
$attrData = $event->getAttributesData();
$productIds = $event->getProductIds();
+ $storeIdFromScope = $event->getStoreId();
$visibility = $attrData[ProductInterface::VISIBILITY] ?? 0;

if (!$visibility || !$productIds) {
return;
}

- $this->adaptUrlRewritesToVisibility->execute($productIds, (int)$visibility);
+ $this->adaptUrlRewritesToVisibility->execute($productIds, (int)$visibility, (int)$storeIdFromScope);
}
}

20 changes: 20 additions & 0 deletions patches/os/ACSD-46192_2.4.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php b/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php
index 8601e5011bd..6718087888b 100644
--- a/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php
+++ b/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php
@@ -113,12 +113,13 @@ class InputParamsResolver

$this->requestValidator->validate();
$webapiResolvedParams = [];
+ $inputData = $this->getInputData();
$route = $this->getRoute();
$routeServiceClass = $route->getServiceClass();
$routeServiceMethod = $route->getServiceMethod();
$this->inputArraySizeLimitValue->set($route->getInputArraySizeLimit());

- foreach ($this->getInputData() as $key => $singleEntityParams) {
+ foreach ($inputData as $key => $singleEntityParams) {
$webapiResolvedParams[$key] = $this->resolveBulkItemParams(
$singleEntityParams,
$routeServiceClass,

Loading

0 comments on commit 2d29ccc

Please sign in to comment.