Skip to content

Commit f667f74

Browse files
merge magento/2.4.0-develop into magento-tsg/2.4.0-develop-pr55
2 parents cb55443 + e10e680 commit f667f74

File tree

106 files changed

+1225
-503
lines changed

Some content is hidden

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

106 files changed

+1225
-503
lines changed

app/code/Magento/Backend/Block/Widget/Button.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ protected function _beforeToHtml()
162162
{
163163
parent::_beforeToHtml();
164164

165-
$buttonId = 'buttonId' .$this->random->getRandomString(32);
165+
$buttonId = 'buttonId' .$this->random->getRandomString(10);
166166
$this->setData('backend_button_widget_hook_id', $buttonId);
167167

168168
$afterHtml = $this->getAfterHtml();

app/code/Magento/Backend/Block/Widget/Button/SplitButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ private function identifyOption(array $option): string
243243
? $this->getId() .'-' .$option['id']
244244
: (isset($option['id_attribute']) ?
245245
$option['id_attribute']
246-
: $this->getId() .'-optId' .$this->random->getRandomString(32));
246+
: $this->getId() .'-optId' .$this->random->getRandomString(10));
247247
}
248248

249249
/**

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ protected function _toLinkHtml($action, \Magento\Framework\DataObject $row)
132132
}
133133

134134
if (empty($action['id'])) {
135-
$action['id'] = 'id' .$this->random->getRandomString(32);
135+
$action['id'] = 'id' .$this->random->getRandomString(10);
136136
}
137137
$actionAttributes->setData($action);
138138
$onclick = $actionAttributes->getData('onclick');

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function renderHeader()
176176
if ($this->getColumn()->getDisabled()) {
177177
$disabled = ' disabled="disabled"';
178178
}
179-
$id = 'id' .$this->random->getRandomString(32);
179+
$id = 'id' .$this->random->getRandomString(10);
180180
$html = '<th class="data-grid-th data-grid-actions-cell"><input type="checkbox" ';
181181
$html .= 'id="' .$id .'" ';
182182
$html .= 'name="' . $this->getColumn()->getFieldName() . '" ';

app/code/Magento/Catalog/Controller/Category/View.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,9 @@ protected function _initCategory()
205205
/**
206206
* Category view action
207207
*
208-
* @return ResultInterface
209208
* @throws NoSuchEntityException
210209
*/
211-
public function execute(): ?ResultInterface
210+
public function execute()
212211
{
213212
$result = null;
214213

app/code/Magento/Catalog/Model/FilterProductCustomAttribute.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
namespace Magento\Catalog\Model;
99

1010
/**
11-
* Filter custom attributes for product using the blacklist
11+
* Filter custom attributes for product using the excluded list
1212
*/
1313
class FilterProductCustomAttribute
1414
{
1515
/**
1616
* @var array
1717
*/
18-
private $blackList;
18+
private $excludedList;
1919

2020
/**
21-
* @param array $blackList
21+
* @param array $excludedList
2222
*/
23-
public function __construct(array $blackList = [])
23+
public function __construct(array $excludedList = [])
2424
{
25-
$this->blackList = $blackList;
25+
$this->excludedList = $excludedList;
2626
}
2727

2828
/**
@@ -33,6 +33,6 @@ public function __construct(array $blackList = [])
3333
*/
3434
public function execute(array $attributes): array
3535
{
36-
return array_diff_key($attributes, array_flip($this->blackList));
36+
return array_diff_key($attributes, array_flip($this->excludedList));
3737
}
3838
}

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,18 @@
1313
"window.productConfigure && productConfigure.onLoadIFrame()",
1414
'iframe[name=\'product_composite_configure_iframe\']:last-of-type'
1515
) ?>
16-
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
17-
"width:0; height:0; border:0px solid #fff; position:absolute; top:-1000px; left:-1000px",
18-
'iframe[name=\'product_composite_configure_iframe\']:last-of-type'
19-
) ?>
2016

2117
<form action="" method="post" id="product_composite_configure_form" enctype="multipart/form-data"
2218
target="product_composite_configure_iframe" class="product_composite_configure_form">
2319
<div class="entry-edit">
2420
<div id="product_composite_configure_messages" class="product_composite_configure_messages">
2521
<div class="messages"><div class="message message-error error"><div></div></div></div>
2622
</div>
27-
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
28-
'display:none;',
29-
'.product_composite_configure_messages:last-of-type'
30-
) ?>
3123
<div id="product_composite_configure_form_fields" class="content product-composite-configure-inner"></div>
3224
<div id="product_composite_configure_form_additional" class="product_composite_configure_form_additional">
3325
</div>
34-
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
35-
'display:none;',
36-
'.product_composite_configure_form_additional:last-of-type'
37-
) ?>
38-
<div id="product_composite_configure_form_confirmed" class="product_composite_configure_form_confirmed"></div>
39-
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
40-
'display:none;',
41-
'.product_composite_configure_form_confirmed:last-of-type'
42-
) ?>
26+
<div id="product_composite_configure_form_confirmed" class="product_composite_configure_form_confirmed">
27+
</div>
4328
</div>
4429
<input type="hidden" name="as_js_varname" value="iFrameResponse" />
4530
<input type="hidden" name="form_key" value="<?= $block->escapeHtmlAttr($block->getFormKey()) ?>" />
@@ -51,12 +36,36 @@
5136
) ?>
5237

5338
<div id="product_composite_configure_confirmed" class="product_composite_configure_confirmed"></div>
54-
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
55-
'display:none;',
56-
'.product_composite_configure_confirmed:last-of-type'
57-
) ?>
5839

5940
<?php $scriptString = <<<script
41+
prodCompConfIframe = document.querySelector("iframe[name='product_composite_configure_iframe']:last-of-type");
42+
prodCompConfIframe.style.width = 0;
43+
prodCompConfIframe.style.height = 0;
44+
prodCompConfIframe.style.border = "0px solid #fff";
45+
prodCompConfIframe.style.position = "absolute";
46+
prodCompConfIframe.style.top = "-1000px";
47+
prodCompConfIframe.style.left = "-1000px";
48+
prodCompConfMessages = document.querySelectorAll(".product_composite_configure_messages");
49+
for (var i = 0; i < prodCompConfMessages.length; i++) {
50+
prodCompConfMessages[i].style.display = "none";
51+
}
52+
prodCompConfFormAdd = document.querySelectorAll(".product_composite_configure_form_additional");
53+
for (var i = 0; i < prodCompConfFormAdd.length; i++) {
54+
prodCompConfFormAdd[i].style.display = "none";
55+
}
56+
prodCompConfFormConf = document.querySelectorAll(".product_composite_configure_form_confirmed");
57+
for (var i = 0; i < prodCompConfFormConf.length; i++) {
58+
prodCompConfFormConf[i].style.display = "none";
59+
}
60+
prodCompConfConf = document.querySelectorAll(".product_composite_configure_confirmed");
61+
for (var i = 0; i < prodCompConfConf.length; i++) {
62+
prodCompConfConf[i].style.display = "none";
63+
}
64+
prodConfPopup = document.querySelectorAll(".product-configure-popup");
65+
for (var i = 0; i < prodConfPopup.length; i++) {
66+
prodConfPopup[i].style.display = "none";
67+
}
68+
6069
require([
6170
"jquery",
6271
"mage/mage"
@@ -69,8 +78,3 @@ script;
6978
?>
7079
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
7180
</div>
72-
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
73-
'display:none',
74-
'.product-configure-popup:last-of-type'
75-
) ?>
76-

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</type>
3838
<type name="Magento\Catalog\Model\FilterProductCustomAttribute">
3939
<arguments>
40-
<argument name="blackList" xsi:type="array">
40+
<argument name="excludedList" xsi:type="array">
4141
<item name="quantity_and_stock_status" xsi:type="string">quantity_and_stock_status</item>
4242
</argument>
4343
</arguments>

app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
* See COPYING.txt for license details.
44
*/
55

6-
define([
7-
'Magento_Customer/js/customer-data'
8-
], function (customerData) {
6+
define(['Magento_Customer/js/customer-data'], function (customerData) {
97
'use strict';
108

11-
var cartData = customerData.get('cart');
9+
return function () {
10+
var cartData = customerData.get('cart');
1211

13-
if (cartData().items && cartData().items.length !== 0) {
14-
customerData.reload(['cart'], false);
15-
}
12+
customerData.getInitCustomerData().done(function () {
13+
if (cartData().items && cartData().items.length !== 0) {
14+
customerData.reload(['cart'], false);
15+
}
16+
});
17+
};
1618
});

app/code/Magento/Config/Block/System/Config/Form/Fieldset.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ protected function _getHeaderTitleHtml($element)
175175
'-link">' . $element->getLegend() . '</a>' .
176176
/* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
177177
'onclick',
178+
'event.preventDefault();' .
178179
"Fieldset.toggleCollapse('" . $element->getHtmlId() . "', '" .
179180
$this->_urlBuilder->getUrl('*/*/state') . "'); return false;",
180181
'a#' . $element->getHtmlId() . '-head'
@@ -225,7 +226,7 @@ protected function _getFooterHtml($element)
225226
);
226227
$html .= $this->secureRenderer->renderStyleAsTag(
227228
'display:none;',
228-
'row_' . $field->getId() . '_comment'
229+
'#row_' . $field->getId() . '_comment'
229230
);
230231
}
231232
}

0 commit comments

Comments
 (0)