Skip to content

Commit

Permalink
🔃 [Magento Community Engineering] Community Contributions - 2.3-develop
Browse files Browse the repository at this point in the history
Accepted Community Pull Requests:
 - magento#22675: Fixed magento#20038 loading icon disappearing before background process completes for Braintree payment in Admin (by @kunal-rtpl)
 - magento#23174: Move Quote related Plugins to correct module (by @sankalpshekhar)
 - magento#23347: Fixes incorrect file reference in a comment in a .htaccess file. (by @hostep)
 - magento#23309: magento#23074: update correct product URL rewrites after changing category url key (by @sta1r)


Fixed GitHub Issues:
 - magento#20038: loading icon disappearing before background process completes for braintree payment (Admin order) (reported by @bharanikonda) has been fixed in magento#22675 by @kunal-rtpl in 2.3-develop branch
   Related commits:
     1. 1a62a10
     2. c1a2bd7
     3. 2f35a3b

 - magento#23074: Magento 2.3.1 - URL rewrite rules are not creating for product after update url key (reported by @Vishrootways) has been fixed in magento#23309 by @sta1r in 2.3-develop branch
   Related commits:
     1. 8fe7c88
     2. 60b577e
     3. 32de280
     4. 0da86ab
     5. 2d0fb70
  • Loading branch information
magento-engcom-team authored Jun 21, 2019
2 parents 485b30f + 746bc75 commit 890bf89
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,11 @@ define([

self.$selector.validate().form();
self.$selector.trigger('afterValidate.beforeSubmit');
$('body').trigger('processStop');

// validate parent form
if (self.$selector.validate().errorList.length) {
$('body').trigger('processStop');

return false;
}

Expand Down
23 changes: 14 additions & 9 deletions app/code/Magento/CatalogUrlRewrite/Observer/UrlRewriteHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,19 @@ public function generateProductUrlRewrites(Category $category): array
if ($category->getChangedProductIds()) {
$this->generateChangedProductUrls($mergeDataProvider, $category, $storeId, $saveRewriteHistory);
} else {
$mergeDataProvider->merge(
$this->getCategoryProductsUrlRewrites(
$category,
$storeId,
$saveRewriteHistory,
$category->getEntityId()
)
);
$categoryStoreIds = $this->getCategoryStoreIds($category);

foreach ($categoryStoreIds as $categoryStoreId) {
$this->isSkippedProduct[$category->getEntityId()] = [];
$mergeDataProvider->merge(
$this->getCategoryProductsUrlRewrites(
$category,
$categoryStoreId,
$saveRewriteHistory,
$category->getEntityId()
)
);
}
}

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

$productCollection->addCategoriesFilter(['eq' => [$category->getEntityId()]])
->setStoreId($storeId)
->addStoreFilter($storeId)
->addAttributeToSelect('name')
->addAttributeToSelect('visibility')
->addAttributeToSelect('url_key')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,14 @@ public function testGenerateProductUrlRewrites()
->willReturn(1);
$category->expects($this->any())
->method('getData')
->with('save_rewrites_history')
->willReturn(true);
->withConsecutive(
[$this->equalTo('save_rewrites_history')],
[$this->equalTo('initial_setup_flag')]
)
->willReturnOnConsecutiveCalls(
true,
null
);

/* @var \Magento\Catalog\Model\Category|\PHPUnit_Framework_MockObject_MockObject $childCategory1 */
$childCategory1 = $this->getMockBuilder(\Magento\Catalog\Model\Category::class)
Expand Down Expand Up @@ -175,6 +181,7 @@ public function testGenerateProductUrlRewrites()
->method('addIdFilter')
->willReturnSelf();
$productCollection->expects($this->any())->method('setStoreId')->willReturnSelf();
$productCollection->expects($this->any())->method('addStoreFilter')->willReturnSelf();
$productCollection->expects($this->any())->method('addAttributeToSelect')->willReturnSelf();
$iterator = new \ArrayIterator([]);
$productCollection->expects($this->any())->method('getIterator')->will($this->returnValue($iterator));
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Quote/etc/webapi_rest/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
</type>
<type name="Magento\Quote\Model\QuoteRepository">
<plugin name="accessControl" type="Magento\Quote\Model\QuoteRepository\Plugin\AccessChangeQuoteControl" />
<plugin name="authorization" type="Magento\Quote\Model\QuoteRepository\Plugin\Authorization" />
</type>
</config>
1 change: 1 addition & 0 deletions app/code/Magento/Quote/etc/webapi_soap/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
</type>
<type name="Magento\Quote\Model\QuoteRepository">
<plugin name="accessControl" type="Magento\Quote\Model\QuoteRepository\Plugin\AccessChangeQuoteControl" />
<plugin name="authorization" type="Magento\Quote\Model\QuoteRepository\Plugin\Authorization" />
</type>
</config>
3 changes: 0 additions & 3 deletions app/code/Magento/Sales/etc/webapi_rest/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Quote\Model\QuoteRepository">
<plugin name="authorization" type="Magento\Quote\Model\QuoteRepository\Plugin\Authorization" />
</type>
<type name="Magento\Sales\Model\ResourceModel\Order">
<plugin name="authorization" type="Magento\Sales\Model\ResourceModel\Order\Plugin\Authorization" />
</type>
Expand Down
3 changes: 0 additions & 3 deletions app/code/Magento/Sales/etc/webapi_soap/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Quote\Model\QuoteRepository">
<plugin name="authorization" type="Magento\Quote\Model\QuoteRepository\Plugin\Authorization" />
</type>
<type name="Magento\Sales\Model\ResourceModel\Order">
<plugin name="authorization" type="Magento\Sales\Model\ResourceModel\Order\Plugin\Authorization" />
</type>
Expand Down
2 changes: 1 addition & 1 deletion pub/media/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SetHandler default-handler
RewriteCond %{REQUEST_FILENAME} !-f

############################################
## rewrite everything else to index.php
## rewrite everything else to get.php

RewriteRule .* ../get.php [L]
</IfModule>
Expand Down

0 comments on commit 890bf89

Please sign in to comment.