Skip to content

Commit 07e57ac

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #22135: Fix broken link in README.md (by @samuel27m) - #21932: Admin-Order-Create-Set-Save-address-checkbox-true-as-default-#106 (by @krnshah) - #22002: Removed unwanted interface implementation (by @vishal-7037) - #21540: Move Magento\Framework\HTTP\ClientInterface preference to app/etc/di.xml (by @kassner) - #21083: Turn on edit mode for product repository when adding children (by @pedrosousa13) Fixed GitHub Issues: - #22001: Magento backend dashboard: Most viewed products tabs gives 404 error in console. (reported by @vishal-7037) has been fixed in #22002 by @vishal-7037 in 2.3-develop branch Related commits: 1. 9e6f56b 2. 8a98f20 - #20366: The parent product doesn't have configurable product options. (reported by @usamahabib786) has been fixed in #21083 by @pedrosousa13 in 2.3-develop branch Related commits: 1. b3b6c90 2. a7f03dd 3. ac98b1f 4. c78535d
2 parents ac17154 + e77830d commit 07e57ac

File tree

7 files changed

+28
-14
lines changed

7 files changed

+28
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.
77

88
## Magento System Requirements
9-
[Magento System Requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements2.html).
9+
[Magento System Requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements.html).
1010

1111
## Install Magento
1212

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9-
use Magento\Framework\App\Action\HttpGetActionInterface;
9+
use Magento\Framework\App\Action\HttpPostActionInterface;
1010

1111
/**
1212
* Get most viewed products controller.
1313
*/
14-
class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
14+
class ProductsViewed extends AjaxBlock implements HttpPostActionInterface
1515
{
1616
/**
1717
* Gets most viewed products list

app/code/Magento/ConfigurableProduct/Model/LinkManagement.php

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
@@ -11,6 +10,11 @@
1110
use Magento\Framework\Exception\NoSuchEntityException;
1211
use Magento\Framework\Exception\StateException;
1312

13+
/**
14+
* Configurable product link management.
15+
*
16+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
17+
*/
1418
class LinkManagement implements \Magento\ConfigurableProduct\Api\LinkManagementInterface
1519
{
1620
/**
@@ -68,7 +72,7 @@ public function __construct(
6872
}
6973

7074
/**
71-
* {@inheritdoc}
75+
* @inheritdoc
7276
*/
7377
public function getChildren($sku)
7478
{
@@ -107,11 +111,15 @@ public function getChildren($sku)
107111
}
108112

109113
/**
110-
* {@inheritdoc}
114+
* @inheritdoc
115+
* @throws InputException
116+
* @throws NoSuchEntityException
117+
* @throws StateException
118+
* @throws \Magento\Framework\Exception\CouldNotSaveException
111119
*/
112120
public function addChild($sku, $childSku)
113121
{
114-
$product = $this->productRepository->get($sku);
122+
$product = $this->productRepository->get($sku, true);
115123
$child = $this->productRepository->get($childSku);
116124

117125
$childrenIds = array_values($this->configurableType->getChildrenIds($product->getId())[0]);
@@ -150,7 +158,11 @@ public function addChild($sku, $childSku)
150158
}
151159

152160
/**
153-
* {@inheritdoc}
161+
* @inheritdoc
162+
* @throws InputException
163+
* @throws NoSuchEntityException
164+
* @throws StateException
165+
* @throws \Magento\Framework\Exception\CouldNotSaveException
154166
*/
155167
public function removeChild($sku, $childSku)
156168
{

app/code/Magento/ReleaseNotification/etc/di.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +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-
<preference for="Magento\Framework\HTTP\ClientInterface" type="Magento\Framework\HTTP\Client\Curl" />
109
<preference for="Magento\ReleaseNotification\Model\ContentProviderInterface" type="Magento\ReleaseNotification\Model\ContentProvider\Http\HttpContentProvider" />
1110
<type name="Magento\Config\Model\Config\TypePool">
1211
<arguments>

app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,8 @@ endif; ?>
8989
<?= $block->getForm()->toHtml() ?>
9090

9191
<div class="admin__field admin__field-option order-save-in-address-book">
92-
<input name="<?= $block->getForm()->getHtmlNamePrefix() ?>[save_in_address_book]" type="checkbox"
93-
id="<?= $block->getForm()->getHtmlIdPrefix() ?>save_in_address_book"
94-
value="1"
95-
<?php if (!$block->getDontSaveInAddressBook() && $block->getAddress()->getSaveInAddressBook()): ?> checked="checked"<?php endif; ?>
96-
class="admin__control-checkbox"/>
92+
<input name="<?= $block->getForm()->getHtmlNamePrefix() ?>[save_in_address_book]" type="checkbox" id="<?= $block->getForm()->getHtmlIdPrefix() ?>save_in_address_book" value="1"
93+
<?php if (!$block->getDontSaveInAddressBook()): ?> checked="checked"<?php endif; ?> class="admin__control-checkbox"/>
9794
<label for="<?= $block->getForm()->getHtmlIdPrefix() ?>save_in_address_book"
9895
class="admin__field-label"><?= /* @escapeNotVerified */ __('Save in address book') ?></label>
9996
</div>

app/etc/di.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@
210210
<preference for="Magento\Framework\MessageQueue\Bulk\ExchangeFactoryInterface" type="Magento\Framework\MessageQueue\Bulk\ExchangeFactory" />
211211
<preference for="Magento\Framework\MessageQueue\QueueFactoryInterface" type="Magento\Framework\MessageQueue\QueueFactory" />
212212
<preference for="Magento\Framework\Search\Request\IndexScopeResolverInterface" type="Magento\Framework\Indexer\ScopeResolver\IndexScopeResolver"/>
213+
<preference for="Magento\Framework\HTTP\ClientInterface" type="Magento\Framework\HTTP\Client\Curl" />
213214
<type name="Magento\Framework\Model\ResourceModel\Db\TransactionManager" shared="false" />
214215
<type name="Magento\Framework\Acl\Data\Cache">
215216
<arguments>

dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewedTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
78
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
89

10+
/**
11+
* Test product viewed backend controller.
12+
*/
913
class ProductsViewedTest extends \Magento\TestFramework\TestCase\AbstractBackendController
1014
{
1115
/**
@@ -14,6 +18,7 @@ class ProductsViewedTest extends \Magento\TestFramework\TestCase\AbstractBackend
1418
*/
1519
public function testExecute()
1620
{
21+
$this->getRequest()->setMethod("POST");
1722
$this->dispatch('backend/admin/dashboard/productsViewed/');
1823

1924
$this->assertEquals(200, $this->getResponse()->getHttpResponseCode());

0 commit comments

Comments
 (0)