Skip to content

Commit 49ad674

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop Minor Fixes
Accepted Public Pull Requests: - #22470: Correct spelling (by @ravi-chandra3197) - #22469: Fix #20111 - display variables in popup while editing existing email template (by @Bartlomiejsz) - #22411: Checkout Totals Sort Order fields can't be empty and should be a number (by @barbanet) - #22456: Fixed issue of drop-down arrow direction in cart price rule (by @hiren0241) - #22446: Removes usage of classes which don't exist from DB migration scripts. (by @hostep) - #22424: PUT /V1/products/:sku/media/:entryId does not change the file (by @Nazar65) - #22285: make return_path_email and set_return_path configurable on website and store scope as well (by @mhauri) Fixed GitHub Issues: - #20111: Email Template Information Insert Variable popup blank (reported by @priti2jcommerce) has been fixed in #22469 by @Bartlomiejsz in 2.3-develop branch Related commits: 1. 7d584ac 2. 4f6a15a 3. 65a61a5 - #22434: While add cart price rule from admin click on Condition drop-down arrow direction not change. (reported by @bhavik43) has been fixed in #22456 by @hiren0241 in 2.3-develop branch Related commits: 1. 27e048f - #22124: Magento 2.3.1: Catalog setup fails with error "Magento\Catalog\Setup\Media does not exist" (reported by @nussjustin) has been fixed in #22446 by @hostep in 2.3-develop branch Related commits: 1. f22e16b 2. 9e00ed2 - #22402: PUT /V1/products/:sku/media/:entryId does not change the file (reported by @philippsander) has been fixed in #22424 by @Nazar65 in 2.3-develop branch Related commits: 1. 9205c6f 2. 986d384 3. 24580ee
2 parents 59b3d72 + 06344ad commit 49ad674

File tree

11 files changed

+135
-99
lines changed

11 files changed

+135
-99
lines changed

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,11 @@
327327
<label>Port (25)</label>
328328
<comment>For Windows server only.</comment>
329329
</field>
330-
<field id="set_return_path" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="0" showInStore="0">
330+
<field id="set_return_path" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1">
331331
<label>Set Return-Path</label>
332332
<source_model>Magento\Config\Model\Config\Source\Yesnocustom</source_model>
333333
</field>
334-
<field id="return_path_email" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="0" showInStore="0">
334+
<field id="return_path_email" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1">
335335
<label>Return-Path Email</label>
336336
<validate>validate-email</validate>
337337
<backend_model>Magento\Config\Model\Config\Backend\Email\Address</backend_model>

app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ public function create($sku, ProductAttributeMediaGalleryEntryInterface $entry)
7171
$product->setMediaGalleryEntries($existingMediaGalleryEntries);
7272
try {
7373
$product = $this->productRepository->save($product);
74+
// phpcs:ignore Magento2.Exceptions.ThrowCatch
7475
} catch (InputException $inputException) {
7576
throw $inputException;
77+
// phpcs:ignore Magento2.Exceptions.ThrowCatch
7678
} catch (\Exception $e) {
7779
throw new StateException(__("The product can't be saved."));
7880
}
@@ -105,7 +107,10 @@ public function update($sku, ProductAttributeMediaGalleryEntryInterface $entry)
105107

106108
if ($existingEntry->getId() == $entry->getId()) {
107109
$found = true;
108-
if ($entry->getFile()) {
110+
111+
$file = $entry->getContent();
112+
113+
if ($file && $file->getBase64EncodedData() || $entry->getFile()) {
109114
$entry->setId(null);
110115
}
111116
$existingMediaGalleryEntries[$key] = $entry;

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
namespace Magento\Catalog\Model\ResourceModel\Product;
88

99
use Magento\Catalog\Api\Data\ProductInterface;
10+
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
11+
use Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver;
1012
use Magento\Catalog\Model\Product\Attribute\Source\Status as ProductStatus;
1113
use Magento\Catalog\Model\Product\Gallery\ReadHandler as GalleryReadHandler;
1214
use Magento\Catalog\Model\ResourceModel\Product\Collection\ProductLimitationFactory;
@@ -16,11 +18,10 @@
1618
use Magento\Framework\App\ObjectManager;
1719
use Magento\Framework\DB\Select;
1820
use Magento\Framework\EntityManager\MetadataPool;
19-
use Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver;
21+
use Magento\Framework\Indexer\DimensionFactory;
22+
use Magento\Framework\Model\ResourceModel\ResourceModelPoolInterface;
2023
use Magento\Store\Model\Indexer\WebsiteDimensionProvider;
2124
use Magento\Store\Model\Store;
22-
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
23-
use Magento\Framework\Indexer\DimensionFactory;
2425

2526
/**
2627
* Product collection
@@ -442,7 +443,7 @@ protected function _preparePriceExpressionParameters($select)
442443
*/
443444
public function getPriceExpression($select)
444445
{
445-
//@todo: Add caching of price expresion
446+
//@todo: Add caching of price expression
446447
$this->_preparePriceExpressionParameters($select);
447448
return $this->_priceExpression;
448449
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Magento\Catalog\Block\Adminhtml\Category\Helper\Pricestep;
1111
use Magento\Catalog\Block\Adminhtml\Category\Helper\Sortby\Available;
1212
use Magento\Catalog\Block\Adminhtml\Category\Helper\Sortby\DefaultSortby;
13-
use Magento\Catalog\Block\Adminhtml\Product\Helper\Form\BaseImage;
1413
use Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Category as CategoryFormHelper;
1514
use Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Weight as WeightFormHelper;
1615
use Magento\Catalog\Model\Attribute\Backend\Customlayoutupdate;
@@ -54,6 +53,8 @@
5453
use Magento\Theme\Model\Theme\Source\Theme;
5554

5655
/**
56+
* Setup category with default entities.
57+
*
5758
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
5859
*/
5960
class CategorySetup extends EavSetup
@@ -593,7 +594,6 @@ public function getDefaultEntities()
593594
'label' => 'Base Image',
594595
'input' => 'media_image',
595596
'frontend' => ImageFrontendModel::class,
596-
'input_renderer' => BaseImage::class,
597597
'required' => false,
598598
'sort_order' => 0,
599599
'global' => ScopedAttributeInterface::SCOPE_STORE,
@@ -626,7 +626,6 @@ public function getDefaultEntities()
626626
'type' => 'varchar',
627627
'label' => 'Media Gallery',
628628
'input' => 'gallery',
629-
'backend' => Media::class,
630629
'required' => false,
631630
'sort_order' => 4,
632631
'group' => 'Images',

app/code/Magento/Customer/Setup/Patch/Data/MigrateStoresAllowedCountriesToWebsite.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88

99
use Magento\Directory\Model\AllowedCountries;
1010
use Magento\Framework\Setup\ModuleDataSetupInterface;
11-
use Magento\Directory\Model\AllowedCountriesFactory;
1211
use Magento\Store\Model\ScopeInterface;
1312
use Magento\Store\Model\StoreManagerInterface;
1413
use Magento\Framework\Setup\Patch\DataPatchInterface;
1514
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1615

16+
/**
17+
* Migrate store allowed countries to website.
18+
*/
1719
class MigrateStoresAllowedCountriesToWebsite implements DataPatchInterface, PatchVersionInterface
1820
{
1921
/**
@@ -27,7 +29,7 @@ class MigrateStoresAllowedCountriesToWebsite implements DataPatchInterface, Patc
2729
private $storeManager;
2830

2931
/**
30-
* @var AllowedCountriesFactory
32+
* @var AllowedCountries
3133
*/
3234
private $allowedCountries;
3335

@@ -48,10 +50,11 @@ public function __construct(
4850
}
4951

5052
/**
51-
* {@inheritdoc}
53+
* @inheritdoc
5254
*/
5355
public function apply()
5456
{
57+
5558
$this->moduleDataSetup->getConnection()->beginTransaction();
5659

5760
try {
@@ -149,7 +152,7 @@ private function mergeAllowedCountries(array $countries, array $newCountries, $i
149152
}
150153

151154
/**
152-
* {@inheritdoc}
155+
* @inheritdoc
153156
*/
154157
public static function getDependencies()
155158
{
@@ -159,15 +162,15 @@ public static function getDependencies()
159162
}
160163

161164
/**
162-
* {@inheritdoc}
165+
* @inheritdoc
163166
*/
164167
public static function getVersion()
165168
{
166169
return '2.0.9';
167170
}
168171

169172
/**
170-
* {@inheritdoc}
173+
* @inheritdoc
171174
*/
172175
public function getAliases()
173176
{

app/code/Magento/Email/Model/Template.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public function getVariablesOptionArray($withGroup = false)
326326
$optionArray[] = ['value' => '{{' . $value . '}}', 'label' => __('%1', $label)];
327327
}
328328
if ($withGroup) {
329-
$optionArray = ['label' => __('Template Variables'), 'value' => $optionArray];
329+
$optionArray = [['label' => __('Template Variables'), 'value' => $optionArray]];
330330
}
331331
}
332332
return $optionArray;
@@ -418,6 +418,8 @@ public function setOptions(array $options)
418418
}
419419

420420
/**
421+
* Return filter factory.
422+
*
421423
* @return \Magento\Email\Model\Template\FilterFactory
422424
*/
423425
protected function getFilterFactory()

0 commit comments

Comments
 (0)