Skip to content

Commit 6cb75d6

Browse files
authored
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - magento-engcom/magento2ce#1117: 5550: Incorrect language on swatch error (by @nmalevanec) - #13101: 11828 Fix issue with swatch colour block not showing in admin panel once colour selected (PHP7.1.x issue). (by @chris-pook) - #12807: Reorder adding of page layout handles (by @aschrammel) Fixed GitHub Issues: - #5550: Incorrect language on swatch error (reported by @Sanfam) has been fixed in magento-engcom/magento2ce#1117 by @nmalevanec in 2.2-develop branch Related commits: 1. a975698 - #11828: Visual Swatches not showing swatch color in admin (reported by @lee586) has been fixed in #13101 by @chris-pook in 2.2-develop branch Related commits: 1. ee5fc2e
2 parents 2a8a96a + 7103f1b commit 6cb75d6

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

app/code/Magento/Catalog/Helper/Product/View.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,18 @@ public function initProductLayout(ResultPage $resultPage, $product, $params = nu
122122
// Load default page handles and page configurations
123123
if ($params && $params->getBeforeHandles()) {
124124
foreach ($params->getBeforeHandles() as $handle) {
125-
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
126125
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], $handle, false);
126+
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
127127
}
128128
}
129-
130-
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
129+
131130
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], null, false);
131+
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
132132

133133
if ($params && $params->getAfterHandles()) {
134134
foreach ($params->getAfterHandles() as $handle) {
135-
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
136135
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], $handle, false);
136+
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
137137
}
138138
}
139139

app/code/Magento/Review/Controller/Product/ListAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ protected function getProductPage($product)
2626
$resultPage->getConfig()->setPageLayout($product->getPageLayout());
2727
}
2828
$urlSafeSku = rawurlencode($product->getSku());
29-
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
3029
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], null, false);
30+
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
3131
$resultPage->addUpdate($product->getCustomLayoutUpdate());
3232
return $resultPage;
3333
}

app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ public function getJsonConfig()
8484
* Parse swatch labels for template
8585
*
8686
* @codeCoverageIgnore
87-
* @param null $swatchStoreValue
88-
* @return string
87+
* @param null|array $swatchStoreValue
88+
* @return null|array
8989
*/
9090
protected function reformatSwatchLabels($swatchStoreValue = null)
9191
{
9292
if ($swatchStoreValue === null) {
9393
return;
9494
}
95-
$newSwatch = '';
95+
$newSwatch = [];
9696
foreach ($swatchStoreValue as $key => $value) {
9797
if ($value[0] == '#') {
9898
$newSwatch[$key] = 'background: '.$value;

app/code/Magento/Swatches/Model/Plugin/EavAttribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ protected function validateOptions(Attribute $attribute)
432432
$options = $attribute->getData('optiontext');
433433
}
434434
if ($options && !$this->isOptionsValid($options, $attribute)) {
435-
throw new InputException(__('Admin is a required field in the each row'));
435+
throw new InputException(__('Admin is a required field in each row'));
436436
}
437437
return true;
438438
}

app/code/Magento/Swatches/Test/Unit/Model/Plugin/EavAttributeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function testBeforeSaveTextSwatch()
191191

192192
/**
193193
* @expectedException \Magento\Framework\Exception\InputException
194-
* @expectedExceptionMessage Admin is a required field in the each row
194+
* @expectedExceptionMessage Admin is a required field in each row
195195
*/
196196
public function testBeforeSaveWithFailedValidation()
197197
{

app/code/Magento/Swatches/i18n/en_US.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"Admin is a required field in the each row","Admin is a required field in the each row"
1+
"Admin is a required field in each row","Admin is a required field in each row"
22
"Update Product Preview Image","Update Product Preview Image"
33
"Filtering by this attribute will update the product image on catalog page","Filtering by this attribute will update the product image on catalog page"
44
"Use Product Image for Swatch if Possible","Use Product Image for Swatch if Possible"

app/code/Magento/Ui/i18n/en_US.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ CSV,CSV
192192
"Please enter a valid value from list","Please enter a valid value from list"
193193
"Please enter valid SKU key.","Please enter valid SKU key."
194194
"Please enter a valid number.","Please enter a valid number."
195-
"Admin is a required field in the each row.","Admin is a required field in the each row."
195+
"Admin is a required field in each row.","Admin is a required field in each row."
196196
"Please fix this field.","Please fix this field."
197197
"Please enter a valid date (ISO).","Please enter a valid date (ISO)."
198198
"Please enter only digits.","Please enter only digits."

lib/web/i18n/en_US.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Submit,Submit
9595
"Please enter valid SKU key.","Please enter valid SKU key."
9696
"Please enter a valid number.","Please enter a valid number."
9797
"This is required field","This is required field"
98-
"Admin is a required field in the each row.","Admin is a required field in the each row."
98+
"Admin is a required field in each row.","Admin is a required field in each row."
9999
"Password cannot be the same as email address.","Password cannot be the same as email address."
100100
"Please fix this field.","Please fix this field."
101101
"Please enter a valid email address.","Please enter a valid email address."

lib/web/mage/validation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,15 +1550,15 @@
15501550
],
15511551
'required-text-swatch-entry': [
15521552
tableSingleValidation,
1553-
$.mage.__('Admin is a required field in the each row.')
1553+
$.mage.__('Admin is a required field in each row.')
15541554
],
15551555
'required-visual-swatch-entry': [
15561556
tableSingleValidation,
1557-
$.mage.__('Admin is a required field in the each row.')
1557+
$.mage.__('Admin is a required field in each row.')
15581558
],
15591559
'required-dropdown-attribute-entry': [
15601560
tableSingleValidation,
1561-
$.mage.__('Admin is a required field in the each row.')
1561+
$.mage.__('Admin is a required field in each row.')
15621562
],
15631563
'validate-item-quantity': [
15641564
function (value, element, params) {

0 commit comments

Comments
 (0)