Skip to content

Commit f2ef946

Browse files
authored
Merge branch '2.4-develop' into B2B-2125
2 parents 6b4afc4 + d553cf9 commit f2ef946

File tree

196 files changed

+21710
-19842
lines changed

Some content is hidden

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

196 files changed

+21710
-19842
lines changed

app/code/Magento/AwsS3/Test/Mftf/Test/AwsS3StorefrontPrintOrderGuestTest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
<description value="Print Order from Guest on Frontend"/>
1616
<severity value="BLOCKER"/>
1717
<testCaseId value="MC-38689"/>
18-
<skip>
19-
<issueId value="MQE-2834" />
20-
</skip>
2118
<group value="remote_storage_aws_s3"/>
2219
<group value="pr_exclude"/>
2320
</annotations>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ protected function _getValue(DataObject $row)
9797
}
9898
return '';
9999
}
100-
return $row->getData($this->getColumn()->getIndex());
100+
return $this->getColumn()->getIndex() !== null
101+
? $row->getData($this->getColumn()->getIndex())
102+
: null;
101103
}
102104

103105
/**

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ protected function _getCurrencyCode($row)
102102
if ($code = $this->getColumn()->getCurrencyCode()) {
103103
return $code;
104104
}
105-
if ($code = $row->getData($this->getColumn()->getCurrency())) {
105+
$currency = $this->getColumn()->getCurrency();
106+
107+
if ($currency !== null && $code = $row->getData($currency)) {
106108
return $code;
107109
}
108110

@@ -118,11 +120,14 @@ protected function _getCurrencyCode($row)
118120
protected function _getRate($row)
119121
{
120122
if ($rate = $this->getColumn()->getRate()) {
121-
return (float)$rate;
123+
return (float) $rate;
122124
}
123-
if ($rate = $row->getData($this->getColumn()->getRateField())) {
124-
return (float)$rate;
125+
$rateField = $this->getColumn()->getRateField();
126+
127+
if ($rateField !== null && $rate = $row->getData($rateField)) {
128+
return (float) $rate;
125129
}
130+
126131
return $this->_defaultBaseCurrency->getRate($this->_getCurrencyCode($row));
127132
}
128133

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function render(\Magento\Framework\DataObject $row)
6060
return $data;
6161
}
6262

63-
$data = (float)$data * $this->_getRate($row);
63+
$data = (float) $data * $this->_getRate($row);
6464
$data = sprintf("%f", $data);
6565
$data = $this->_localeCurrency->getCurrency($currencyCode)->toCurrency($data);
6666
return $data;
@@ -79,7 +79,9 @@ protected function _getCurrencyCode($row)
7979
if ($code = $this->getColumn()->getCurrencyCode()) {
8080
return $code;
8181
}
82-
if ($code = $row->getData($this->getColumn()->getCurrency())) {
82+
$currency = $this->getColumn()->getCurrency();
83+
84+
if ($currency !== null && $code = $row->getData($currency)) {
8385
return $code;
8486
}
8587
return false;
@@ -94,10 +96,12 @@ protected function _getCurrencyCode($row)
9496
protected function _getRate($row)
9597
{
9698
if ($rate = $this->getColumn()->getRate()) {
97-
return (float)$rate;
99+
return (float) $rate;
98100
}
99-
if ($rate = $row->getData($this->getColumn()->getRateField())) {
100-
return (float)$rate;
101+
$rateField = $this->getColumn()->getRateField();
102+
103+
if ($rateField !== null && $rate = $row->getData($rateField)) {
104+
return (float) $rate;
101105
}
102106
return 1;
103107
}

app/code/Magento/Catalog/Setup/Patch/Data/UpdateMultiselectAttributesBackendTypes.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ public function getAliases()
5959
public function apply()
6060
{
6161
$this->dataSetup->startSetup();
62+
$setup = $this->dataSetup;
63+
$connection = $setup->getConnection();
6264

63-
$connection = $this->dataSetup->getConnection();
64-
$attributeTable = $connection->getTableName('eav_attribute');
65+
$attributeTable = $setup->getTable('eav_attribute');
6566
/** @var EavSetup $eavSetup */
6667
$eavSetup = $this->eavSetupFactory->create(['setup' => $this->dataSetup]);
6768
$entityTypeId = $eavSetup->getEntityTypeId(Product::ENTITY);
@@ -74,8 +75,8 @@ public function apply()
7475
->where('frontend_input = ?', 'multiselect')
7576
);
7677

77-
$varcharTable = $connection->getTableName('catalog_product_entity_varchar');
78-
$textTable = $connection->getTableName('catalog_product_entity_text');
78+
$varcharTable = $setup->getTable('catalog_product_entity_varchar');
79+
$textTable = $setup->getTable('catalog_product_entity_text');
7980
$varcharTableDataSql = $connection
8081
->select()
8182
->from($varcharTable)

app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductRemoveImagesTest.xml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@
4949
<actionGroup ref="AdminOpenProductImagesSectionActionGroup" stepKey="expandImages"/>
5050

5151
<!-- Upload and set Base image -->
52-
<attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="adobe-base.jpg" stepKey="attach1"/>
53-
<waitForPageLoad stepKey="waitForUpload1"/>
52+
<actionGroup ref="AddProductImageActionGroup" stepKey="attach1">
53+
<argument name="image" value="TestImageAdobe"/>
54+
</actionGroup>
55+
<comment userInput="BIC workaround" stepKey="waitForUpload1"/>
56+
<waitForElementVisible selector="{{AdminProductImagesSection.nthProductImage('1')}}" stepKey="waitForOpenImageDetails1"/>
5457
<click selector="{{AdminProductImagesSection.nthProductImage('1')}}" stepKey="openImageDetails1"/>
5558
<waitForPageLoad stepKey="waitForSlideout1"/>
5659
<conditionalClick selector="{{AdminProductImagesSection.roleBase}}" dependentSelector="{{AdminProductImagesSection.isBaseSelected}}" visible="false" stepKey="base1"/>
@@ -61,8 +64,11 @@
6164
<waitForPageLoad stepKey="waitForHide1"/>
6265

6366
<!-- Upload and set Small image -->
64-
<attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="adobe-small.jpg" stepKey="attach2"/>
65-
<waitForPageLoad stepKey="waitForUpload2"/>
67+
<actionGroup ref="AddProductImageActionGroup" stepKey="attach2">
68+
<argument name="image" value="AdobeSmallImage"/>
69+
</actionGroup>
70+
<comment userInput="BIC workaround" stepKey="waitForUpload2"/>
71+
<waitForElementVisible selector="{{AdminProductImagesSection.nthProductImage('2')}}" stepKey="waitForOpenImageDetails2"/>
6672
<click selector="{{AdminProductImagesSection.nthProductImage('2')}}" stepKey="openImageDetails2"/>
6773
<waitForPageLoad stepKey="waitForSlideout2"/>
6874
<conditionalClick selector="{{AdminProductImagesSection.roleBase}}" dependentSelector="{{AdminProductImagesSection.isBaseSelected}}" visible="true" stepKey="base2"/>
@@ -73,8 +79,11 @@
7379
<waitForPageLoad stepKey="waitForHide2"/>
7480

7581
<!-- Upload and set Thumbnail image -->
76-
<attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="adobe-thumb.jpg" stepKey="attach3"/>
77-
<waitForPageLoad stepKey="waitForUpload3"/>
82+
<actionGroup ref="AddProductImageActionGroup" stepKey="attach3">
83+
<argument name="image" value="AdobeThumbImage"/>
84+
</actionGroup>
85+
<comment userInput="BIC workaround" stepKey="waitForUpload3"/>
86+
<waitForElementVisible selector="{{AdminProductImagesSection.nthProductImage('3')}}" stepKey="waitForOpenImageDetails3"/>
7887
<click selector="{{AdminProductImagesSection.nthProductImage('3')}}" stepKey="openImageDetails3"/>
7988
<waitForPageLoad stepKey="waitForSlideout3"/>
8089
<conditionalClick selector="{{AdminProductImagesSection.roleBase}}" dependentSelector="{{AdminProductImagesSection.isBaseSelected}}" visible="true" stepKey="base3"/>

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
<createData entity="SimpleProduct" stepKey="simpleProduct">
2323
<requiredEntity createDataKey="defaultCategory"/>
2424
</createData>
25+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
26+
<argument name="indices" value=""/>
27+
</actionGroup>
2528
</before>
2629
<after>
2730
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>

app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
*/
66
namespace Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab;
77

8-
use Magento\Backend\Block\Widget\Form;
98
use Magento\Backend\Block\Widget\Form\Generic;
9+
use Magento\Backend\Block\Widget\Form\Renderer\Fieldset;
1010
use Magento\Ui\Component\Layout\Tabs\TabInterface;
1111
use Magento\Rule\Model\Condition\AbstractCondition;
1212

1313
class Conditions extends Generic implements TabInterface
1414
{
1515
/**
16-
* @var \Magento\Backend\Block\Widget\Form\Renderer\Fieldset
16+
* @var Fieldset
1717
*/
1818
protected $_rendererFieldset;
1919

@@ -27,15 +27,15 @@ class Conditions extends Generic implements TabInterface
2727
* @param \Magento\Framework\Registry $registry
2828
* @param \Magento\Framework\Data\FormFactory $formFactory
2929
* @param \Magento\Rule\Block\Conditions $conditions
30-
* @param \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset
30+
* @param Fieldset $rendererFieldset
3131
* @param array $data
3232
*/
3333
public function __construct(
3434
\Magento\Backend\Block\Template\Context $context,
3535
\Magento\Framework\Registry $registry,
3636
\Magento\Framework\Data\FormFactory $formFactory,
3737
\Magento\Rule\Block\Conditions $conditions,
38-
\Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset,
38+
Fieldset $rendererFieldset,
3939
array $data = []
4040
) {
4141
$this->_rendererFieldset = $rendererFieldset;
@@ -121,7 +121,7 @@ public function isAjaxLoaded()
121121
}
122122

123123
/**
124-
* @return Form
124+
* @inheritdoc
125125
*/
126126
protected function _prepareForm()
127127
{
@@ -135,6 +135,8 @@ protected function _prepareForm()
135135
}
136136

137137
/**
138+
* Adds 'Conditions' to the form.
139+
*
138140
* @param \Magento\CatalogRule\Api\Data\RuleInterface $model
139141
* @param string $fieldsetId
140142
* @param string $formName
@@ -154,7 +156,8 @@ protected function addTabToForm($model, $fieldsetId = 'conditions_fieldset', $fo
154156
['form_namespace' => $formName]
155157
);
156158

157-
$renderer = $this->_rendererFieldset->setTemplate('Magento_CatalogRule::promo/fieldset.phtml')
159+
$renderer = $this->getLayout()->createBlock(Fieldset::class);
160+
$renderer->setTemplate('Magento_CatalogRule::promo/fieldset.phtml')
158161
->setNewChildUrl($newChildUrl)
159162
->setFieldSetId($conditionsFieldSetId);
160163

@@ -183,6 +186,8 @@ protected function addTabToForm($model, $fieldsetId = 'conditions_fieldset', $fo
183186
}
184187

185188
/**
189+
* Sets form name for Condition section.
190+
*
186191
* @param AbstractCondition $conditions
187192
* @param string $formName
188193
* @param string $jsFormName

app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleByPercentTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</before>
3737
<after>
3838
<!-- delete the simple product and catalog price rule and logout -->
39-
<amOnPage stepKey="goToPriceRulePage" url="admin/catalog_rule/promo_catalog/"/>
39+
<amOnPage stepKey="goToPriceRulePage" url="{{CatalogRulePage.url}}"/>
4040
<actionGroup stepKey="deletePriceRule" ref="deleteEntitySecondaryGrid">
4141
<argument name="name" value="{{_defaultCatalogRule.name}}"/>
4242
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>

app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ public function __construct(
177177
TotalRecordsResolverFactory $totalRecordsResolverFactory = null,
178178
DefaultFilterStrategyApplyCheckerInterface $defaultFilterStrategyApplyChecker = null
179179
) {
180-
$this->searchResultFactory = $searchResultFactory ?? \Magento\Framework\App\ObjectManager::getInstance()
181-
->get(\Magento\Framework\Api\Search\SearchResultFactory::class);
180+
$this->searchResultFactory = $searchResultFactory
181+
?? ObjectManager::getInstance()->get(SearchResultFactory::class);
182182
parent::__construct(
183183
$entityFactory,
184184
$logger,
@@ -368,13 +368,12 @@ public function _loadEntities($printQuery = false, $logQuery = false)
368368
$this->getEntity();
369369

370370
$this->printLogQuery($printQuery, $logQuery);
371-
371+
/**
372+
* Prepare select query
373+
* @var string $query
374+
*/
375+
$query = $this->getSelect();
372376
try {
373-
/**
374-
* Prepare select query
375-
* @var string $query
376-
*/
377-
$query = $this->getSelect();
378377
$rows = $this->_fetchAll($query);
379378
} catch (\Exception $e) {
380379
$this->printLogQuery(false, true, $query);
@@ -455,7 +454,7 @@ protected function _renderFiltersBefore()
455454
}
456455

457456
if ($this->searchRequestName !== 'quick_search_container'
458-
|| strlen(trim($this->queryText))
457+
|| ($this->queryText && strlen(trim($this->queryText)))
459458
) {
460459
$this->prepareSearchTermFilter();
461460
$this->preparePriceAggregation();

0 commit comments

Comments
 (0)