Skip to content

Commit 890bf89

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.3-develop
Accepted Community Pull Requests: - #22675: Fixed #20038 loading icon disappearing before background process completes for Braintree payment in Admin (by @kunal-rtpl) - #23174: Move Quote related Plugins to correct module (by @sankalpshekhar) - #23347: Fixes incorrect file reference in a comment in a .htaccess file. (by @hostep) - #23309: #23074: update correct product URL rewrites after changing category url key (by @sta1r) Fixed GitHub Issues: - #20038: loading icon disappearing before background process completes for braintree payment (Admin order) (reported by @bharanikonda) has been fixed in #22675 by @kunal-rtpl in 2.3-develop branch Related commits: 1. 1a62a10 2. c1a2bd7 3. 2f35a3b - #23074: Magento 2.3.1 - URL rewrite rules are not creating for product after update url key (reported by @Vishrootways) has been fixed in #23309 by @sta1r in 2.3-develop branch Related commits: 1. 8fe7c88 2. 60b577e 3. 32de280 4. 0da86ab 5. 2d0fb70
2 parents 485b30f + 746bc75 commit 890bf89

File tree

8 files changed

+28
-19
lines changed

8 files changed

+28
-19
lines changed

app/code/Magento/Braintree/view/adminhtml/web/js/braintree.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,11 @@ define([
295295

296296
self.$selector.validate().form();
297297
self.$selector.trigger('afterValidate.beforeSubmit');
298-
$('body').trigger('processStop');
299298

300299
// validate parent form
301300
if (self.$selector.validate().errorList.length) {
301+
$('body').trigger('processStop');
302+
302303
return false;
303304
}
304305

app/code/Magento/CatalogUrlRewrite/Observer/UrlRewriteHandler.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,19 @@ public function generateProductUrlRewrites(Category $category): array
143143
if ($category->getChangedProductIds()) {
144144
$this->generateChangedProductUrls($mergeDataProvider, $category, $storeId, $saveRewriteHistory);
145145
} else {
146-
$mergeDataProvider->merge(
147-
$this->getCategoryProductsUrlRewrites(
148-
$category,
149-
$storeId,
150-
$saveRewriteHistory,
151-
$category->getEntityId()
152-
)
153-
);
146+
$categoryStoreIds = $this->getCategoryStoreIds($category);
147+
148+
foreach ($categoryStoreIds as $categoryStoreId) {
149+
$this->isSkippedProduct[$category->getEntityId()] = [];
150+
$mergeDataProvider->merge(
151+
$this->getCategoryProductsUrlRewrites(
152+
$category,
153+
$categoryStoreId,
154+
$saveRewriteHistory,
155+
$category->getEntityId()
156+
)
157+
);
158+
}
154159
}
155160

156161
foreach ($this->childrenCategoriesProvider->getChildren($category, true) as $childCategory) {
@@ -241,7 +246,7 @@ private function getCategoryProductsUrlRewrites(
241246
$productCollection = $this->productCollectionFactory->create();
242247

243248
$productCollection->addCategoriesFilter(['eq' => [$category->getEntityId()]])
244-
->setStoreId($storeId)
249+
->addStoreFilter($storeId)
245250
->addAttributeToSelect('name')
246251
->addAttributeToSelect('visibility')
247252
->addAttributeToSelect('url_key')

app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/UrlRewriteHandlerTest.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,14 @@ public function testGenerateProductUrlRewrites()
138138
->willReturn(1);
139139
$category->expects($this->any())
140140
->method('getData')
141-
->with('save_rewrites_history')
142-
->willReturn(true);
141+
->withConsecutive(
142+
[$this->equalTo('save_rewrites_history')],
143+
[$this->equalTo('initial_setup_flag')]
144+
)
145+
->willReturnOnConsecutiveCalls(
146+
true,
147+
null
148+
);
143149

144150
/* @var \Magento\Catalog\Model\Category|\PHPUnit_Framework_MockObject_MockObject $childCategory1 */
145151
$childCategory1 = $this->getMockBuilder(\Magento\Catalog\Model\Category::class)
@@ -175,6 +181,7 @@ public function testGenerateProductUrlRewrites()
175181
->method('addIdFilter')
176182
->willReturnSelf();
177183
$productCollection->expects($this->any())->method('setStoreId')->willReturnSelf();
184+
$productCollection->expects($this->any())->method('addStoreFilter')->willReturnSelf();
178185
$productCollection->expects($this->any())->method('addAttributeToSelect')->willReturnSelf();
179186
$iterator = new \ArrayIterator([]);
180187
$productCollection->expects($this->any())->method('getIterator')->will($this->returnValue($iterator));

app/code/Magento/Quote/etc/webapi_rest/di.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
</type>
1212
<type name="Magento\Quote\Model\QuoteRepository">
1313
<plugin name="accessControl" type="Magento\Quote\Model\QuoteRepository\Plugin\AccessChangeQuoteControl" />
14+
<plugin name="authorization" type="Magento\Quote\Model\QuoteRepository\Plugin\Authorization" />
1415
</type>
1516
</config>

app/code/Magento/Quote/etc/webapi_soap/di.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
</type>
1212
<type name="Magento\Quote\Model\QuoteRepository">
1313
<plugin name="accessControl" type="Magento\Quote\Model\QuoteRepository\Plugin\AccessChangeQuoteControl" />
14+
<plugin name="authorization" type="Magento\Quote\Model\QuoteRepository\Plugin\Authorization" />
1415
</type>
1516
</config>

app/code/Magento/Sales/etc/webapi_rest/di.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9-
<type name="Magento\Quote\Model\QuoteRepository">
10-
<plugin name="authorization" type="Magento\Quote\Model\QuoteRepository\Plugin\Authorization" />
11-
</type>
129
<type name="Magento\Sales\Model\ResourceModel\Order">
1310
<plugin name="authorization" type="Magento\Sales\Model\ResourceModel\Order\Plugin\Authorization" />
1411
</type>

app/code/Magento/Sales/etc/webapi_soap/di.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9-
<type name="Magento\Quote\Model\QuoteRepository">
10-
<plugin name="authorization" type="Magento\Quote\Model\QuoteRepository\Plugin\Authorization" />
11-
</type>
129
<type name="Magento\Sales\Model\ResourceModel\Order">
1310
<plugin name="authorization" type="Magento\Sales\Model\ResourceModel\Order\Plugin\Authorization" />
1411
</type>

pub/media/.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ SetHandler default-handler
3131
RewriteCond %{REQUEST_FILENAME} !-f
3232

3333
############################################
34-
## rewrite everything else to index.php
34+
## rewrite everything else to get.php
3535

3636
RewriteRule .* ../get.php [L]
3737
</IfModule>

0 commit comments

Comments
 (0)