Skip to content

Commit 9312b47

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #22321: #22317: CodeSniffer should not mark correctly aligned DocBlock elements as code style violation. (by @p-bystritsky) - #22362: [Fixed] Category Update without "name" cannot be saved in scope "all" with REST API (by @niravkrish) - #22381: Qty box visibility issue in wishlist when product is out of stock (by @ansari-krish) - #22339: Spelling Mistake in Setup > Patch (by @sudhanshu-bajaj) - #22154: Fiexed 22152 - Click on search icon it does not working on admin grid sticky header (by @niravkrish) - #22320: Removed redundant Gallery subscription for catalog rules (by @VitaliyBoyko) - #22332: Fixes a less compilation error: '.no-link a' isn't defined when .emai� (by @hostep) - #22281: Fixed "Please specify the admin custom URL" error on app:config:import CLI command (by @davidalger) - #22318: #21747 Fix catalog_product_flat_data attribute value for store during indexer (by @OlehWolf) - #22298: Alignment Issue While Editing Order Data containing Downlodable Products with "Links can be purchased separately" enabled in Admin Section (by @ansari-krish) - #22265: Show the correct subtotal amount for partial creditmemo email (by @kassner) - #22226: Remove all marketing get params on Varnish to minimize the cache objects (added facebook and bronto parameter) (by @lfluvisotto) - #22200: fatalErrorHandler returns 500 only on fatal errors (by @wexo-team) - #22133: setAttributeSetFilter accepts both integer and integer-array (by @NiklasBr) - #21936: 21907: Place order button disabled after failed email address validation check with braintree credit card (by @kisroman) - #21968: Layered Navigation: �Equalize product count� not working as expected (by @Nazar65) - #21378: Fix for issue #21299. Change HEAD action mapping to GET action interface and add HEAD request handling (by @mattijv) Fixed GitHub Issues: - #22317: CodeSniffer should not mark correctly aligned DocBlock elements as code style violation. (reported by @p-bystritsky) has been fixed in #22321 by @p-bystritsky in 2.3-develop branch Related commits: 1. bed152b 2. 92d0f93 - #22309: Category Update without "name" cannot be saved in scope "all" with REST API (reported by @cmuench) has been fixed in #22362 by @niravkrish in 2.3-develop branch Related commits: 1. d4972dc - #22152: Click on search icon it does not working (reported by @Dharmeshvaja91) has been fixed in #22154 by @niravkrish in 2.3-develop branch Related commits: 1. 6cbf55d - #22330: Error "extend ' .no-link a' has no matches" when compiling email-inline css using an alternative less compiler (reported by @hostep) has been fixed in #22332 by @hostep in 2.3-develop branch Related commits: 1. 12c848c - #15090: app:config:import fails with "Please specify the admin custom URL." (reported by @BlitzInternet) has been fixed in #22281 by @davidalger in 2.3-develop branch Related commits: 1. 8434d74 2. e340978 - #21747: catalog_product_flat_data for store view populated with default view data when it should be store view data (reported by @bengower) has been fixed in #22318 by @OlehWolf in 2.3-develop branch Related commits: 1. ae7179f 2. 1a1eda6 - #20917: Alignment Issue While Editing Order Data containing Downlodable Products in Admin Section (reported by @pankaj-cedcoss) has been fixed in #22298 by @ansari-krish in 2.3-develop branch Related commits: 1. 9e24d22 - #22199: A bug with health_check.php (reported by @wexo-team) has been fixed in #22200 by @wexo-team in 2.3-develop branch Related commits: 1. 9675984 - #21907: Place order button disabled after failed email address validation check with braintree credit card (reported by @deepakgairola25) has been fixed in #21936 by @kisroman in 2.3-develop branch Related commits: 1. 47233d8 2. 46e8525 - #6715: Few weaknesses in the code (reported by @AppChecker) has been fixed in #21968 by @Nazar65 in 2.3-develop branch Related commits: 1. 7cb0cf8 2. bbe71ef - #21960: Layered Navigation: �Equalize product count� not working as expected (reported by @trinitecDev) has been fixed in #21968 by @Nazar65 in 2.3-develop branch Related commits: 1. 7cb0cf8 2. bbe71ef - #21299: HEAD request returns 404 (reported by @kolucciy) has been fixed in #21378 by @mattijv in 2.3-develop branch Related commits: 1. 46191d8 2. d8eb160 3. 72630cd 4. 4f7db3a 5. e198914 6. 22b9e56 7. 69bd2dd 8. ce2e4d3 9. 56d4cc2 10. 2b58789 11. 5b79a30 12. 6bac208 13. 880404c 14. bc3ef7a 15. be77120 16. fecce53 17. 3d19c09 18. 2a337f9 19. b5683e8 20. 740e4bd
2 parents b85552f + 6469d03 commit 9312b47

File tree

28 files changed

+552
-141
lines changed

28 files changed

+552
-141
lines changed

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/hosted-fields.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ define([
1010
'Magento_Braintree/js/view/payment/method-renderer/cc-form',
1111
'Magento_Braintree/js/validator',
1212
'Magento_Vault/js/view/payment/vault-enabler',
13-
'mage/translate'
14-
], function ($, Component, validator, VaultEnabler, $t) {
13+
'mage/translate',
14+
'Magento_Checkout/js/model/payment/additional-validators'
15+
], function ($, Component, validator, VaultEnabler, $t, additionalValidators) {
1516
'use strict';
1617

1718
return Component.extend({
@@ -154,7 +155,7 @@ define([
154155
* Trigger order placing
155156
*/
156157
placeOrderClick: function () {
157-
if (this.validateCardType()) {
158+
if (this.validateCardType() && additionalValidators.validate()) {
158159
this.isPlaceOrderActionAllowed(false);
159160
$(this.getSelector('submit')).trigger('click');
160161
}

app/code/Magento/Catalog/Api/Data/CategoryInterface.php

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22
/**
3-
* Category data interface
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
86

97
namespace Magento\Catalog\Api\Data;
108

119
/**
10+
* Category data interface.
11+
*
1212
* @api
1313
* @since 100.0.2
1414
*/
@@ -46,11 +46,15 @@ interface CategoryInterface extends \Magento\Framework\Api\CustomAttributesDataI
4646
/**#@-*/
4747

4848
/**
49+
* Retrieve category id.
50+
*
4951
* @return int|null
5052
*/
5153
public function getId();
5254

5355
/**
56+
* Set category id.
57+
*
5458
* @param int $id
5559
* @return $this
5660
*/
@@ -74,7 +78,7 @@ public function setParentId($parentId);
7478
/**
7579
* Get category name
7680
*
77-
* @return string
81+
* @return string|null
7882
*/
7983
public function getName();
8084

@@ -132,60 +136,82 @@ public function getLevel();
132136
public function setLevel($level);
133137

134138
/**
139+
* Retrieve children ids comma separated.
140+
*
135141
* @return string|null
136142
*/
137143
public function getChildren();
138144

139145
/**
146+
* Retrieve category creation date and time.
147+
*
140148
* @return string|null
141149
*/
142150
public function getCreatedAt();
143151

144152
/**
153+
* Set category creation date and time.
154+
*
145155
* @param string $createdAt
146156
* @return $this
147157
*/
148158
public function setCreatedAt($createdAt);
149159

150160
/**
161+
* Retrieve category last update date and time.
162+
*
151163
* @return string|null
152164
*/
153165
public function getUpdatedAt();
154166

155167
/**
168+
* Set category last update date and time.
169+
*
156170
* @param string $updatedAt
157171
* @return $this
158172
*/
159173
public function setUpdatedAt($updatedAt);
160174

161175
/**
176+
* Retrieve category full path.
177+
*
162178
* @return string|null
163179
*/
164180
public function getPath();
165181

166182
/**
183+
* Set category full path.
184+
*
167185
* @param string $path
168186
* @return $this
169187
*/
170188
public function setPath($path);
171189

172190
/**
191+
* Retrieve available sort by for category.
192+
*
173193
* @return string[]|null
174194
*/
175195
public function getAvailableSortBy();
176196

177197
/**
198+
* Set available sort by for category.
199+
*
178200
* @param string[]|string $availableSortBy
179201
* @return $this
180202
*/
181203
public function setAvailableSortBy($availableSortBy);
182204

183205
/**
206+
* Get category is included in menu.
207+
*
184208
* @return bool|null
185209
*/
186210
public function getIncludeInMenu();
187211

188212
/**
213+
* Set category is included in menu.
214+
*
189215
* @param bool $includeInMenu
190216
* @return $this
191217
*/

app/code/Magento/Catalog/Model/Indexer/Product/Flat/TableBuilder.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function build($storeId, $changedIds, $valueFieldSuffix)
115115
/**
116116
* Create empty temporary table with given columns list
117117
*
118-
* @param string $tableName Table name
118+
* @param string $tableName Table name
119119
* @param array $columns array('columnName' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute, ...)
120120
* @param string $valueFieldSuffix
121121
*
@@ -304,12 +304,16 @@ protected function _fillTemporaryTable(
304304

305305
/** @var $attribute \Magento\Catalog\Model\ResourceModel\Eav\Attribute */
306306
foreach ($columnsList as $columnName => $attribute) {
307-
$countTableName = 't' . $iterationNum++;
307+
$countTableName = 't' . ($iterationNum++);
308308
$joinCondition = sprintf(
309-
'e.%3$s = %1$s.%3$s AND %1$s.attribute_id = %2$d AND %1$s.store_id = 0',
309+
'e.%3$s = %1$s.%3$s' .
310+
' AND %1$s.attribute_id = %2$d' .
311+
' AND (%1$s.store_id = %4$d' .
312+
' OR %1$s.store_id = 0)',
310313
$countTableName,
311314
$attribute->getId(),
312-
$metadata->getLinkField()
315+
$metadata->getLinkField(),
316+
$storeId
313317
);
314318

315319
$select->joinLeft(
@@ -323,9 +327,10 @@ protected function _fillTemporaryTable(
323327
$columnValueName = $attributeCode . $valueFieldSuffix;
324328
if (isset($flatColumns[$columnValueName])) {
325329
$valueJoinCondition = sprintf(
326-
'e.%1$s = %2$s.option_id AND %2$s.store_id = 0',
330+
'e.%1$s = %2$s.option_id AND (%2$s.store_id = %3$d OR %2$s.store_id = 0)',
327331
$attributeCode,
328-
$countTableName
332+
$countTableName,
333+
$storeId
329334
);
330335
$selectValue->joinLeft(
331336
[

app/code/Magento/CatalogRule/etc/mview.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<table name="catalog_product_entity" entity_column="entity_id" />
1717
<table name="catalog_product_entity_datetime" entity_column="entity_id" />
1818
<table name="catalog_product_entity_decimal" entity_column="entity_id" />
19-
<table name="catalog_product_entity_gallery" entity_column="entity_id" />
2019
<table name="catalog_product_entity_int" entity_column="entity_id" />
2120
<table name="catalog_product_entity_text" entity_column="entity_id" />
2221
<table name="catalog_product_entity_tier_price" entity_column="entity_id" />

app/code/Magento/CatalogSearch/Model/Layer/Filter/Decimal.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,9 @@ protected function _getItemsData()
111111
$from = '';
112112
}
113113
if ($to == '*') {
114-
$to = '';
114+
$to = null;
115115
}
116-
$label = $this->renderRangeLabel(
117-
empty($from) ? 0 : $from,
118-
empty($to) ? 0 : $to
119-
);
116+
$label = $this->renderRangeLabel(empty($from) ? 0 : $from, $to);
120117
$value = $from . '-' . $to;
121118

122119
$data[] = [
@@ -141,7 +138,7 @@ protected function _getItemsData()
141138
protected function renderRangeLabel($fromPrice, $toPrice)
142139
{
143140
$formattedFromPrice = $this->priceCurrency->format($fromPrice);
144-
if ($toPrice === '') {
141+
if ($toPrice === null) {
145142
return __('%1 and above', $formattedFromPrice);
146143
} else {
147144
if ($fromPrice != $toPrice) {

app/code/Magento/Config/Model/Config/Backend/Admin/Usecustom.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
namespace Magento\Config\Model\Config\Backend\Admin;
1111

1212
/**
13+
* Process custom admin url during configuration value save process.
14+
*
1315
* @api
1416
* @since 100.0.2
1517
*/
@@ -56,8 +58,9 @@ public function beforeSave()
5658
{
5759
$value = $this->getValue();
5860
if ($value == 1) {
59-
$customUrl = $this->getData('groups/url/fields/custom/value');
60-
if (empty($customUrl)) {
61+
$customUrlField = $this->getData('groups/url/fields/custom/value');
62+
$customUrlConfig = $this->_config->getValue('admin/url/custom');
63+
if (empty($customUrlField) && empty($customUrlConfig)) {
6164
throw new \Magento\Framework\Exception\LocalizedException(__('Please specify the admin custom URL.'));
6265
}
6366
}

app/code/Magento/Downloadable/view/adminhtml/templates/product/composite/fieldset/downloadable.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
value="<?= /* @escapeNotVerified */ $_link->getId() ?>" <?= /* @escapeNotVerified */ $block->getLinkCheckedValue($_link) ?>
3131
price="<?= /* @escapeNotVerified */ $block->getCurrencyPrice($_link->getPrice()) ?>"/>
3232
<?php endif; ?>
33-
<label for="links_<?= /* @escapeNotVerified */ $_link->getId() ?>" class="label">
33+
<label for="links_<?= /* @escapeNotVerified */ $_link->getId() ?>" class="label admin__field-label">
3434
<?= $block->escapeHtml($_link->getTitle()) ?>
3535
<?php if ($_link->getSampleFile() || $_link->getSampleUrl()): ?>
3636
&nbsp;(<a href="<?= /* @escapeNotVerified */ $block->getLinkSampleUrl($_link) ?>" <?= $block->getIsOpenInNewWindow()?'onclick="this.target=\'_blank\'"':'' ?>><?= /* @escapeNotVerified */ __('sample') ?></a>)

app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Collection.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Eav\Model\ResourceModel\Entity\Attribute;
78

89
use Magento\Eav\Model\Entity\Type;
@@ -128,7 +129,7 @@ public function setEntityTypeFilter($type)
128129
/**
129130
* Specify attribute set filter
130131
*
131-
* @param int $setId
132+
* @param int|int[] $setId
132133
* @return $this
133134
*/
134135
public function setAttributeSetFilter($setId)
@@ -183,6 +184,7 @@ public function setAttributeSetFilterBySetName($attributeSetName, $entityTypeCod
183184

184185
/**
185186
* Specify multiple attribute sets filter
187+
*
186188
* Result will be ordered by sort_order
187189
*
188190
* @param array $setIds
@@ -225,7 +227,6 @@ public function setInAllAttributeSetsFilter(array $setIds)
225227
->having(new \Zend_Db_Expr('COUNT(*)') . ' = ' . count($setIds));
226228
}
227229

228-
//$this->getSelect()->distinct(true);
229230
$this->setOrder('is_user_defined', self::SORT_ORDER_ASC);
230231

231232
return $this;
@@ -475,7 +476,7 @@ public function addStoreLabel($storeId)
475476
}
476477

477478
/**
478-
* {@inheritdoc}
479+
* @inheritdoc
479480
*/
480481
public function getSelectCountSql()
481482
{

app/code/Magento/PageCache/etc/varnish4.vcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ sub vcl_recv {
9292
}
9393

9494
# Remove all marketing get parameters to minimize the cache objects
95-
if (req.url ~ "(\?|&)(gclid|cx|ie|cof|siteurl|zanpid|origin|mc_[a-z]+|utm_[a-z]+)=") {
96-
set req.url = regsuball(req.url, "(gclid|cx|ie|cof|siteurl|zanpid|origin|mc_[a-z]+|utm_[a-z]+)=[-_A-z0-9+()%.]+&?", "");
95+
if (req.url ~ "(\?|&)(gclid|cx|ie|cof|siteurl|zanpid|origin|fbclid|mc_[a-z]+|utm_[a-z]+|_bta_[a-z]+)=") {
96+
set req.url = regsuball(req.url, "(gclid|cx|ie|cof|siteurl|zanpid|origin|fbclid|mc_[a-z]+|utm_[a-z]+|_bta_[a-z]+)=[-_A-z0-9+()%.]+&?", "");
9797
set req.url = regsub(req.url, "[?|&]+$", "");
9898
}
9999

app/code/Magento/PageCache/etc/varnish5.vcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ sub vcl_recv {
9393
}
9494

9595
# Remove all marketing get parameters to minimize the cache objects
96-
if (req.url ~ "(\?|&)(gclid|cx|ie|cof|siteurl|zanpid|origin|mc_[a-z]+|utm_[a-z]+)=") {
97-
set req.url = regsuball(req.url, "(gclid|cx|ie|cof|siteurl|zanpid|origin|mc_[a-z]+|utm_[a-z]+)=[-_A-z0-9+()%.]+&?", "");
96+
if (req.url ~ "(\?|&)(gclid|cx|ie|cof|siteurl|zanpid|origin|fbclid|mc_[a-z]+|utm_[a-z]+|_bta_[a-z]+)=") {
97+
set req.url = regsuball(req.url, "(gclid|cx|ie|cof|siteurl|zanpid|origin|fbclid|mc_[a-z]+|utm_[a-z]+|_bta_[a-z]+)=[-_A-z0-9+()%.]+&?", "");
9898
set req.url = regsub(req.url, "[?|&]+$", "");
9999
}
100100

app/code/Magento/Sales/view/frontend/templates/email/items/creditmemo/default.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
</td>
3232
<td class="item-qty"><?= /* @escapeNotVerified */ $_item->getQty() * 1 ?></td>
3333
<td class="item-price">
34-
<?= /* @escapeNotVerified */ $block->getItemPrice($_item->getOrderItem()) ?>
34+
<?= /* @escapeNotVerified */ $block->getItemPrice($_item) ?>
3535
</td>
3636
</tr>

app/code/Magento/Ui/view/base/web/js/grid/search/search.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ define([
1111
'uiLayout',
1212
'mage/translate',
1313
'mageUtils',
14-
'uiElement'
15-
], function (_, layout, $t, utils, Element) {
14+
'uiElement',
15+
'jquery'
16+
], function (_, layout, $t, utils, Element, $) {
1617
'use strict';
1718

1819
return Element.extend({
@@ -29,11 +30,13 @@ define([
2930
tracks: {
3031
value: true,
3132
previews: true,
32-
inputValue: true
33+
inputValue: true,
34+
focused: true
3335
},
3436
imports: {
3537
inputValue: 'value',
36-
updatePreview: 'value'
38+
updatePreview: 'value',
39+
focused: false
3740
},
3841
exports: {
3942
value: '${ $.provider }:params.search'
@@ -88,6 +91,18 @@ define([
8891
return this;
8992
},
9093

94+
/**
95+
* Click To ScrollTop.
96+
*/
97+
scrollTo: function ($data) {
98+
$('html, body').animate({
99+
scrollTop: 0
100+
}, 'slow', function () {
101+
$data.focused = false;
102+
$data.focused = true;
103+
});
104+
},
105+
91106
/**
92107
* Resets input value to the last applied state.
93108
*

app/code/Magento/Ui/view/base/web/templates/grid/search/search.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
-->
77
<div class="data-grid-search-control-wrap">
8-
<label class="data-grid-search-label" attr="title: $t('Search'), for: index">
8+
<label class="data-grid-search-label" attr="title: $t('Search'), for: index" data-bind="click: scrollTo">
99
<span translate="'Search'"/>
1010
</label>
1111
<input class="admin__control-text data-grid-search-control" type="text"
@@ -16,6 +16,7 @@
1616
placeholder: $t(placeholder)
1717
},
1818
textInput: inputValue,
19+
hasFocus: focused,
1920
keyboard: {
2021
13: apply.bind($data, false),
2122
27: cancel

app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $allowedQty = $viewModel->setItem($item)->getMinMaxQty();
2525
<label class="label" for="qty[<?= $block->escapeHtmlAttr($item->getId()) ?>]"><span><?= $block->escapeHtml(__('Qty')) ?></span></label>
2626
<div class="control">
2727
<input type="number" data-role="qty" id="qty[<?= $block->escapeHtmlAttr($item->getId()) ?>]" class="input-text qty" data-validate="{'required-number':true,'validate-greater-than-zero':true, 'validate-item-quantity':{'minAllowed':<?= /* @noEscape */ $allowedQty['minAllowed'] ?>,'maxAllowed':<?= /* @noEscape */ $allowedQty['maxAllowed'] ?>}}"
28-
name="qty[<?= $block->escapeHtmlAttr($item->getId()) ?>]" value="<?= /* @noEscape */ (int)($block->getAddToCartQty($item) * 1) ?>">
28+
name="qty[<?= $block->escapeHtmlAttr($item->getId()) ?>]" value="<?= /* @noEscape */ (int)($block->getAddToCartQty($item) * 1) ?>" <?= $product->isSaleable() ? '' : 'disabled="disabled"' ?>>
2929
</div>
3030
</div>
3131
<?php endif; ?>

0 commit comments

Comments
 (0)