Skip to content

Commit 7cf99d1

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.3-develop
Accepted Community Pull Requests: - #22003: Do not validate length and input rule if attribute value is required but empty (by @VincentMarmiesse) - #23325: Fix unexpected diff between builds in generated/metadata directory (by @ihor-sviziev) - #24104: Resolve Console error when clicking select all at "Newsletter Problems Report" (issue 24102) (by @edenduong) - #24017: ImportExport module missing some translation (by @edenduong) Fixed GitHub Issues: - #23324: [Reproducible Builds] Diff in generated/metadata between the builds (reported by @ihor-sviziev) has been fixed in #23325 by @ihor-sviziev in 2.3-develop branch Related commits: 1. d8486ba - #24102: Console error when clicking checkbox at "Newsletter Problems Report" (reported by @edenduong) has been fixed in #24104 by @edenduong in 2.3-develop branch Related commits: 1. d7606f4 2. 86d5c22
2 parents adee85d + d895667 commit 7cf99d1

File tree

6 files changed

+28
-6
lines changed

6 files changed

+28
-6
lines changed

app/code/Magento/Eav/Model/Attribute/Data/Text.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ public function validateValue($value)
7575
if (empty($value) && $value !== '0' && $attribute->getDefaultValue() === null) {
7676
$label = __($attribute->getStoreLabel());
7777
$errors[] = __('"%1" is a required value.', $label);
78+
79+
return $errors;
7880
}
7981

8082
$validateLengthResult = $this->validateLength($attribute, $value);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,5 @@ Summary,Summary
123123
"New product data is added to existing product data entries in the database. All fields except SKU can be updated.","New product data is added to existing product data entries in the database. All fields except SKU can be updated."
124124
"All existing product data is replaced with the imported new data. <b>Exercise caution when replacing data. All existing product data will be completely cleared and all references in the system will be lost.</b>","All existing product data is replaced with the imported new data. <b>Exercise caution when replacing data. All existing product data will be completely cleared and all references in the system will be lost.</b>"
125125
"Any entities in the import data that match existing entities in the database are deleted from the database.","Any entities in the import data that match existing entities in the database are deleted from the database."
126+
"Invalid data","Invalid data"
127+
"Invalid response","Invalid response"

app/code/Magento/ImportExport/view/adminhtml/templates/export/form/before.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ require([
8989
form.action = oldAction;
9090
} else {
9191
alert({
92-
content: 'Invalid data'
92+
content: '<?= $block->escapeHtml(__('Invalid data')); ?>'
9393
});
9494
}
9595
};

app/code/Magento/ImportExport/view/adminhtml/templates/import/form/before.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ require([
209209
postToFrameProcessResponse: function(response) {
210210
if ('object' != typeof(response)) {
211211
alert({
212-
content: 'Invalid response'
212+
content: '<?= $block->escapeHtml(__('Invalid response')); ?>'
213213
});
214214

215215
return false;

app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ require(["prototype", "mage/adminhtml/events"], function(){
1717

1818
problemController = {
1919
checkCheckboxes:function (controlCheckbox) {
20-
var elements = $('problemGrid').getElementsByClassName('problemCheckbox');
21-
elements.each(function (obj) {
22-
obj.checked = controlCheckbox.checked;
23-
});
20+
var elements = $$('input.problemCheckbox');
21+
if (elements && elements.length) {
22+
elements.each(function (obj) {
23+
obj.checked = controlCheckbox.checked;
24+
});
25+
}
2426
},
2527
rowClick:function (e) {
2628
if (!Event.element(e).hasClassName('problemCheckbox')) {

setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ public function doOperation()
8888
}
8989
}
9090

91+
$this->sortDefinitions($definitionsCollection);
92+
9193
$areaCodes = array_merge([App\Area::AREA_GLOBAL], $this->areaList->getCodes());
9294
foreach ($areaCodes as $areaCode) {
9395
$config = $this->configReader->generateCachePerScope($definitionsCollection, $areaCode);
@@ -124,4 +126,18 @@ public function getName()
124126
{
125127
return 'Area configuration aggregation';
126128
}
129+
130+
/**
131+
* Sort definitions to make reproducible result
132+
*
133+
* @param DefinitionsCollection $definitionsCollection
134+
*/
135+
private function sortDefinitions(DefinitionsCollection $definitionsCollection): void
136+
{
137+
$definitions = $definitionsCollection->getCollection();
138+
139+
ksort($definitions);
140+
141+
$definitionsCollection->initialize($definitions);
142+
}
127143
}

0 commit comments

Comments
 (0)