Skip to content

Commit af07d6e

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into MC-17269
2 parents f35aaab + 3495a05 commit af07d6e

File tree

95 files changed

+44526
-10822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+44526
-10822
lines changed

app/code/Magento/AdminNotification/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"magento/module-backend": "*",
1212
"magento/module-media-storage": "*",
1313
"magento/module-store": "*",
14-
"magento/module-ui": "*"
14+
"magento/module-ui": "*",
15+
"magento/module-config": "*"
1516
},
1617
"type": "magento2-module",
1718
"license": [

app/code/Magento/Analytics/Test/Mftf/Section/AdminConfigAdvancedReportingSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<element name="advancedReportingIndustry" type="select" selector="#analytics_general_vertical"/>
1515
<element name="advancedReportingIndustryLabel" type="text" selector=".config-vertical-label>label>span"/>
1616
<element name="advancedReportingHour" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(2)"/>
17-
<element name="advancedReportingMinute" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(3)"/>
18-
<element name="advancedReportingSeconds" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(4)"/>
17+
<element name="advancedReportingMinute" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(4)"/>
18+
<element name="advancedReportingSeconds" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(6)"/>
1919
<element name="advancedReportingBlankIndustryError" type="text" selector=".message-error>div"/>
2020
</section>
2121
</sections>

app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1111
<test name="AdminLoginTest">
1212
<annotations>
1313
<features value="Backend"/>
@@ -24,4 +24,4 @@
2424
<seeInCurrentUrl url="{{AdminLoginPage.url}}" stepKey="seeAdminLoginUrl"/>
2525
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
2626
</test>
27-
</tests>
27+
</tests>
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminPrivacyPolicyTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Checks to see if privacy policy url is in the admin page and every sub page"/>
15+
<title value="There should be a privacy policy url in the admin page and every sub page"/>
16+
<description value="There should be a privacy policy url in the admin page and every sub page"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-17787"/>
19+
<group value="backend"/>
20+
<group value="login"/>
21+
</annotations>
22+
23+
<!-- Logging in Magento admin and checking for Privacy policy footer in dashboard -->
24+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
25+
<closeAdminNotification stepKey="closeAdminNotification"/>
26+
<seeLink userInput="Privacy Policy" url="https://magento.com/sites/default/files/REVISED-MAGENTO-PRIVACY-POLICY.pdf" stepKey="seePrivacyPolicyLinkDashboard"/>
27+
28+
<!-- Checking for Privacy policy footer in salesOrderPage -->
29+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSalesOrder">
30+
<argument name="menuUiId" value="magento-sales-sales"/>
31+
<argument name="submenuUiId" value="magento-sales-sales-order"/>
32+
</actionGroup>
33+
<seeLink userInput="Privacy Policy" url="https://magento.com/sites/default/files/REVISED-MAGENTO-PRIVACY-POLICY.pdf" stepKey="seePrivacyPolicyLinkSalesOrder"/>
34+
35+
<!-- Checking for Privacy policy footer in catalogProductsPage -->
36+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToCatalogProducts">
37+
<argument name="menuUiId" value="magento-catalog-catalog"/>
38+
<argument name="submenuUiId" value="magento-catalog-catalog-products"/>
39+
</actionGroup>
40+
<seeLink userInput="Privacy Policy" url="https://magento.com/sites/default/files/REVISED-MAGENTO-PRIVACY-POLICY.pdf" stepKey="seePrivacyPolicyLinkCatalogProducts"/>
41+
42+
<!-- Checking for Privacy policy footer in customersAllCustomersPage -->
43+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToCustomersAllCustomers">
44+
<argument name="menuUiId" value="magento-customer-customer"/>
45+
<argument name="submenuUiId" value="magento-customer-customer-manage"/>
46+
</actionGroup>
47+
<seeLink userInput="Privacy Policy" url="https://magento.com/sites/default/files/REVISED-MAGENTO-PRIVACY-POLICY.pdf" stepKey="seePrivacyPolicyLinkCustomersAllCustomers"/>
48+
49+
<!-- Checking for Privacy policy footer in marketingCatalogPriceRulePage -->
50+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToMarketingCatalogPriceRule">
51+
<argument name="menuUiId" value="magento-backend-marketing"/>
52+
<argument name="submenuUiId" value="magento-catalogrule-promo-catalog"/>
53+
</actionGroup>
54+
<seeLink userInput="Privacy Policy" url="https://magento.com/sites/default/files/REVISED-MAGENTO-PRIVACY-POLICY.pdf" stepKey="seePrivacyPolicyLinkMarketingCatalogPriceRule"/>
55+
56+
<!-- Checking for Privacy policy footer in contentBlocksPage -->
57+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToContentBlocks">
58+
<argument name="menuUiId" value="magento-backend-content"/>
59+
<argument name="submenuUiId" value="magento-cms-cms-block"/>
60+
</actionGroup>
61+
<seeLink userInput="Privacy Policy" url="https://magento.com/sites/default/files/REVISED-MAGENTO-PRIVACY-POLICY.pdf" stepKey="seePrivacyPolicyLinkContentBlocks"/>
62+
63+
<!-- Checking for Privacy policy footer in reportSearcbTermsPage -->
64+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsSearchTerms">
65+
<argument name="menuUiId" value="magento-reports-report"/>
66+
<argument name="submenuUiId" value="magento-search-report-search-term"/>
67+
</actionGroup>
68+
<seeLink userInput="Privacy Policy" url="https://magento.com/sites/default/files/REVISED-MAGENTO-PRIVACY-POLICY.pdf" stepKey="seePrivacyPolicyLinkReportsSearchTerms"/>
69+
70+
<!-- Checking for Privacy policy footer in storesAllStoresPage -->
71+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToStoresAllStores">
72+
<argument name="menuUiId" value="magento-backend-stores"/>
73+
<argument name="submenuUiId" value="magento-backend-system-store"/>
74+
</actionGroup>
75+
<seeLink userInput="Privacy Policy" url="https://magento.com/sites/default/files/REVISED-MAGENTO-PRIVACY-POLICY.pdf" stepKey="seePrivacyPolicyLinkStoresAllStores"/>
76+
77+
<!-- Checking for Privacy policy footer in systemImportPage -->
78+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSystemImport">
79+
<argument name="menuUiId" value="magento-backend-system"/>
80+
<argument name="submenuUiId" value="magento-importexport-system-convert-import"/>
81+
</actionGroup>
82+
<seeLink userInput="Privacy Policy" url="https://magento.com/sites/default/files/REVISED-MAGENTO-PRIVACY-POLICY.pdf" stepKey="seePrivacyPolicyLinkSystemImport"/>
83+
84+
<!-- Checking for Privacy policy footer in findPartnersAndExtensionsPage -->
85+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToFindPartnersAndExtensions">
86+
<argument name="menuUiId" value="magento-marketplace-partners"/>
87+
<argument name="submenuUiId" value="magento-marketplace-partners"/>
88+
</actionGroup>
89+
<seeLink userInput="Privacy Policy" url="https://magento.com/sites/default/files/REVISED-MAGENTO-PRIVACY-POLICY.pdf" stepKey="seePrivacyPolicyLinkFindPartnersAndExtensions"/>
90+
</test>
91+
</tests>
92+
93+

app/code/Magento/Backend/view/adminhtml/layout/default.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,17 @@
6060
</container>
6161
<container name="legal.system" htmlTag="div" htmlClass="footer-legal-system col-m-6">
6262
<block class="Magento\Backend\Block\Page\Footer" name="version" as="version" />
63+
<block class="Magento\Framework\View\Element\Template" name="privacyPolicy" as="privacyPolicy" template="Magento_Backend::page/privacyPolicy.phtml">
64+
<arguments>
65+
<argument name="privacypolicy_url" xsi:type="string">https://magento.com/sites/default/files/REVISED-MAGENTO-PRIVACY-POLICY.pdf</argument>
66+
</arguments>
67+
</block>
6368
<block class="Magento\Framework\View\Element\Template" name="report" as="report" template="Magento_Backend::page/report.phtml">
6469
<arguments>
6570
<argument name="bugreport_url" xsi:type="string">https://github.com/magento/magento2/issues</argument>
6671
</arguments>
6772
</block>
73+
6874
</container>
6975
</container>
7076
</referenceContainer>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
?>
8+
9+
<a class="link-report" href="<?= $block->escapeUrl($block->getPrivacypolicyUrl()) ?>" id="footer_privacy" target="_blank">
10+
<?= $block->escapeHtml(__('Privacy Policy')) ?>
11+
</a> |

app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function getLoadTreeUrl($expanded = null)
253253
*/
254254
public function getNodesUrl()
255255
{
256-
return $this->getUrl('catalog/category/jsonTree');
256+
return $this->getUrl('catalog/category/tree');
257257
}
258258

259259
/**

app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Magento\Store\Model\Store;
99

1010
/**
11-
* Grid.
11+
* Catalog product grid
1212
*
1313
* @api
1414
* @since 100.0.2
@@ -87,9 +87,7 @@ public function __construct(
8787
}
8888

8989
/**
90-
* Construct.
91-
*
92-
* @return void
90+
* @inheritDoc
9391
*/
9492
protected function _construct()
9593
{
@@ -106,6 +104,7 @@ protected function _construct()
106104
* Get store.
107105
*
108106
* @return Store
107+
* @throws \Magento\Framework\Exception\NoSuchEntityException
109108
*/
110109
protected function _getStore()
111110
{
@@ -115,8 +114,6 @@ protected function _getStore()
115114

116115
/**
117116
* @inheritDoc
118-
*
119-
* @return $this
120117
*/
121118
protected function _prepareCollection()
122119
{
@@ -195,9 +192,6 @@ protected function _prepareCollection()
195192

196193
/**
197194
* @inheritDoc
198-
*
199-
* @param \Magento\Backend\Block\Widget\Grid\Column $column
200-
* @return $this
201195
*/
202196
protected function _addColumnFilterToCollection($column)
203197
{
@@ -218,9 +212,8 @@ protected function _addColumnFilterToCollection($column)
218212

219213
/**
220214
* @inheritDoc
221-
*
222-
* @return $this
223215
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
216+
* @throws \Exception
224217
*/
225218
protected function _prepareColumns()
226219
{
@@ -375,18 +368,11 @@ protected function _prepareColumns()
375368
]
376369
);
377370

378-
$block = $this->getLayout()->getBlock('grid.bottom.links');
379-
if ($block) {
380-
$this->setChild('grid.bottom.links', $block);
381-
}
382-
383371
return parent::_prepareColumns();
384372
}
385373

386374
/**
387375
* @inheritDoc
388-
*
389-
* @return $this
390376
*/
391377
protected function _prepareMassaction()
392378
{
@@ -438,20 +424,15 @@ protected function _prepareMassaction()
438424
}
439425

440426
/**
441-
* Get grid Url.
442-
*
443-
* @return string
427+
* @inheritDoc
444428
*/
445429
public function getGridUrl()
446430
{
447431
return $this->getUrl('catalog/*/grid', ['_current' => true]);
448432
}
449433

450434
/**
451-
* Get row url.
452-
*
453-
* @param \Magento\Catalog\Model\Product|\Magento\Framework\DataObject $row
454-
* @return string
435+
* @inheritDoc
455436
*/
456437
public function getRowUrl($row)
457438
{

app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grid.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
99
<update handle="formkey"/>
1010
<container name="root" label="Root">
11-
<block class="Magento\Catalog\Block\Adminhtml\Product\Grid" name="admin.product.grid"/>
11+
<block class="Magento\Catalog\Block\Adminhtml\Product\Grid" name="admin.product.grid">
12+
<block class="Magento\Framework\View\Element\Text\ListText" name="grid.bottom.links"/>
13+
</block>
1214
</container>
1315
</layout>

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
* @SuppressWarnings(PHPMD.TooManyFields)
3939
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
4040
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
41+
* @SuppressWarnings(PHPMD.ExcessivePublicCount)
4142
* @since 100.0.2
4243
*/
4344
class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
@@ -1508,6 +1509,7 @@ public function getImagesFromRow(array $rowData)
15081509
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
15091510
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
15101511
* @throws LocalizedException
1512+
* phpcs:disable Generic.Metrics.NestingLevel
15111513
*/
15121514
protected function _saveProducts()
15131515
{
@@ -2487,6 +2489,12 @@ public function validateRow(array $rowData, $rowNum)
24872489
*/
24882490
private function isNeedToValidateUrlKey($rowData)
24892491
{
2492+
if (!empty($rowData[self::COL_SKU]) && empty($rowData[self::URL_KEY])
2493+
&& $this->getBehavior() === Import::BEHAVIOR_APPEND
2494+
&& $this->isSkuExist($rowData[self::COL_SKU])) {
2495+
return false;
2496+
}
2497+
24902498
return (!empty($rowData[self::URL_KEY]) || !empty($rowData[self::COL_NAME]))
24912499
&& (empty($rowData[self::COL_VISIBILITY])
24922500
|| $rowData[self::COL_VISIBILITY]
@@ -2810,7 +2818,8 @@ protected function getUrlKey($rowData)
28102818
return trim(strtolower($urlKey));
28112819
}
28122820

2813-
if (!empty($rowData[self::COL_NAME])) {
2821+
if (!empty($rowData[self::COL_NAME])
2822+
&& (array_key_exists(self::URL_KEY, $rowData) || !$this->isSkuExist($rowData[self::COL_SKU]))) {
28142823
return $this->productUrl->formatUrlKey($rowData[self::COL_NAME]);
28152824
}
28162825

0 commit comments

Comments
 (0)