Skip to content

Commit c0b07c1

Browse files
Merge branch '2.3-develop' of github.com:magento/magento2ce into MAGETWO-87132-2.3
2 parents bcaa9b0 + b99f6f7 commit c0b07c1

File tree

37 files changed

+436
-113
lines changed

37 files changed

+436
-113
lines changed

.htaccess.sample

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@
111111
############################################
112112
## enable rewrites
113113

114-
Options +FollowSymLinks
114+
# The following line has better security but add some performance overhead - see https://httpd.apache.org/docs/2.4/en/misc/perf-tuning.html
115+
Options -FollowSymLinks +SymLinksIfOwnerMatch
115116
RewriteEngine on
116117

117118
############################################

app/code/Magento/Backend/Controller/Adminhtml/Noroute/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function execute()
3434
{
3535
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
3636
$resultPage = $this->resultPageFactory->create();
37-
$resultPage->setStatusHeader(404, '1.1', 'Forbidden');
37+
$resultPage->setStatusHeader(404, '1.1', 'Not Found');
3838
$resultPage->setHeader('Status', '404 File not found');
3939
$resultPage->addHandle('adminhtml_noroute');
4040
return $resultPage;

app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<div class="messages">
8686
<div class="message message-notice notice">
8787
<span
88-
translate="'Search strings are either normal strings or regular exceptions (PCRE). They are matched in the same order as entered.'"></span>
88+
translate="'Search strings are either normal strings or regular expressions (PCRE). They are matched in the same order as entered.'"></span>
8989
<br>
9090
<span
9191
translate="'Examples'"></span>:

app/code/Magento/Catalog/Setup/InstallSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
674674
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
675675
null,
676676
['unsigned' => true, 'nullable' => false, 'default' => '0'],
677-
'Attriute Set ID'
677+
'Attribute Set ID'
678678
)
679679
->addColumn(
680680
'parent_id',

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@
55
*/
66
namespace Magento\CatalogImportExport\Model\Import;
77

8+
use Magento\Catalog\Model\Config as CatalogConfig;
89
use Magento\Catalog\Model\Product\Visibility;
910
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
1011
use Magento\Framework\App\Filesystem\DirectoryList;
11-
use Magento\Framework\App\ObjectManager;
12+
use Magento\Framework\Filesystem;
1213
use Magento\Framework\Model\ResourceModel\Db\ObjectRelationProcessor;
1314
use Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface;
1415
use Magento\Framework\Stdlib\DateTime;
15-
use Magento\Framework\Filesystem;
1616
use Magento\ImportExport\Model\Import;
1717
use Magento\ImportExport\Model\Import\Entity\AbstractEntity;
1818
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingError;
1919
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
20-
use Magento\Catalog\Model\Config as CatalogConfig;
2120

2221
/**
2322
* Import entity product model
@@ -1298,20 +1297,15 @@ protected function _saveLinks()
12981297
*/
12991298
protected function _saveProductAttributes(array $attributesData)
13001299
{
1300+
$linkField = $this->getProductEntityLinkField();
13011301
foreach ($attributesData as $tableName => $skuData) {
13021302
$tableData = [];
13031303
foreach ($skuData as $sku => $attributes) {
1304-
$linkId = $this->_connection->fetchOne(
1305-
$this->_connection->select()
1306-
->from($this->getResource()->getTable('catalog_product_entity'))
1307-
->where('sku = ?', (string)$sku)
1308-
->columns($this->getProductEntityLinkField())
1309-
);
1310-
1304+
$linkId = $this->_oldSku[strtolower($sku)][$linkField];
13111305
foreach ($attributes as $attributeId => $storeValues) {
13121306
foreach ($storeValues as $storeId => $storeValue) {
13131307
$tableData[] = [
1314-
$this->getProductEntityLinkField() => $linkId,
1308+
$linkField => $linkId,
13151309
'attribute_id' => $attributeId,
13161310
'store_id' => $storeId,
13171311
'value' => $storeValue,
@@ -1321,6 +1315,7 @@ protected function _saveProductAttributes(array $attributesData)
13211315
}
13221316
$this->_connection->insertOnDuplicate($tableName, $tableData, ['value']);
13231317
}
1318+
13241319
return $this;
13251320
}
13261321

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
namespace Magento\CatalogImportExport\Test\Unit\Model\Import;
77

88
use Magento\Framework\App\Filesystem\DirectoryList;
9-
use Magento\Framework\Stdlib\DateTime;
109
use Magento\ImportExport\Model\Import;
1110

1211
/**
@@ -513,25 +512,6 @@ public function testSaveProductAttributes()
513512
]
514513
]
515514
];
516-
$entityTable = 'catalog_product_entity';
517-
$resource = $this->getMockBuilder(\Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModel::class)
518-
->disableOriginalConstructor()
519-
->setMethods(['getTable'])
520-
->getMock();
521-
$resource->expects($this->once())->method('getTable')->with($entityTable)->willReturnArgument(0);
522-
$this->_resourceFactory->expects($this->once())->method('create')->willReturn($resource);
523-
$selectMock = $this->getMockBuilder(\Magento\Framework\DB\Select::class)
524-
->disableOriginalConstructor()
525-
->getMock();
526-
$selectMock->expects($this->once())->method('from')->with($entityTable, '*', null)->willReturnSelf();
527-
$selectMock->expects($this->once())->method('where')->with('sku = ?', $testSku)->willReturnSelf();
528-
$selectMock->expects($this->once())->method('columns')->with('entity_id')->willReturnSelf();
529-
$this->_connection->expects($this->any())->method('fetchOne')->willReturn(self::ENTITY_ID);
530-
$this->_connection->expects($this->any())->method('select')->willReturn($selectMock);
531-
$this->_connection->expects($this->any())
532-
->method('quoteInto')
533-
->willReturnCallback([$this, 'returnQuoteCallback']);
534-
535515
$tableData[] = [
536516
'entity_id' => self::ENTITY_ID,
537517
'attribute_id' => $attributeId,
@@ -541,6 +521,7 @@ public function testSaveProductAttributes()
541521
$this->_connection->expects($this->once())
542522
->method('insertOnDuplicate')
543523
->with($testTable, $tableData, ['value']);
524+
$this->setPropertyValue($this->importProduct, '_oldSku', [$testSku => ['entity_id' => self::ENTITY_ID]]);
544525
$object = $this->invokeMethod($this->importProduct, '_saveProductAttributes', [$attributesData]);
545526
$this->assertEquals($this->importProduct, $object);
546527
}

app/code/Magento/Checkout/view/frontend/web/js/region-updater.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ define([
206206
regionInput.removeClass('required-entry');
207207
}
208208

209-
regionList.removeClass('required-entry').hide();
209+
regionList.removeClass('required-entry').prop('disabled', 'disabled').hide();
210210
regionInput.show();
211211
label.attr('for', regionInput.attr('id'));
212212
}

app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ private function loadUsedProducts(\Magento\Catalog\Model\Product $product, $cach
12961296
if ($salableOnly) {
12971297
$collection = $this->salableProcessor->process($collection);
12981298
}
1299-
$usedProducts = $collection->getItems();
1299+
$usedProducts = array_values($collection->getItems());
13001300
$this->saveUsedProductsCacheData($product, $usedProducts, $cacheKey);
13011301
}
13021302
$product->setData($dataFieldName, $usedProducts);

app/code/Magento/CustomerImportExport/Model/Import/Customer.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,29 @@ protected function _saveCustomerEntities(array $entitiesToCreate, array $entitie
270270
$this->_connection->insertOnDuplicate(
271271
$this->_entityTable,
272272
$entitiesToUpdate,
273-
$this->customerFields
273+
$this->getCustomerEntityFieldsToUpdate($entitiesToUpdate)
274274
);
275275
}
276276

277277
return $this;
278278
}
279279

280+
/**
281+
* Filter the entity that are being updated so we only change fields found in the importer file
282+
*
283+
* @param array $entitiesToUpdate
284+
* @return array
285+
*/
286+
private function getCustomerEntityFieldsToUpdate(array $entitiesToUpdate): array
287+
{
288+
$firstCustomer = reset($entitiesToUpdate);
289+
$columnsToUpdate = array_keys($firstCustomer);
290+
$customerFieldsToUpdate = array_filter($this->customerFields, function ($field) use ($columnsToUpdate) {
291+
return in_array($field, $columnsToUpdate);
292+
});
293+
return $customerFieldsToUpdate;
294+
}
295+
280296
/**
281297
* Save customer attributes.
282298
*

app/code/Magento/GoogleOptimizer/view/adminhtml/ui_component/cms_page_form.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
</settings>
1414
<container name="google_experiment_container" sortOrder="250">
1515
<htmlContent name="html_content">
16-
<block name="googleOptimizerBlockAdminhtmlFormCmsPage" class="Magento\GoogleOptimizer\Block\Adminhtml\Form\CmsPage" />
16+
<block name="googleOptimizerBlockAdminhtmlFormCmsPage" class="Magento\GoogleOptimizer\Block\Adminhtml\Form\CmsPage">
17+
<arguments>
18+
<argument name="code-entity" xsi:type="string">Magento\GoogleOptimizer\Block\Adminhtml\Cms\Page\EntityCmsPage</argument>
19+
<argument name="form-name" xsi:type="string">cms_page_form</argument>
20+
</arguments>
21+
</block>
1722
</htmlContent>
1823
</container>
1924
</fieldset>

0 commit comments

Comments
 (0)