Skip to content

Commit 9186f4a

Browse files
author
Stanislav Idolov
authored
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #19066: Add additional check if password hash is empty in auth process (by @progreg) - #19026: #18256: Reset password throws error since 2.2.6. (by @p-bystritsky) - #19040: [Forwardport] save downloadable product links for order items (by @swnsma) - #19048: WYSIWYG unable to set default value in ui component (by @omiroshnichenko) - #19050: Add/update newsletter messages in translation file (by @arnoudhgz) - #19029: 18901-Forgot-password-form-should-not-available-while-customer-is-log� (by @agorbulin) - #19010: Fix for Internet Explorer 11: Edit customer in backend leads sometimes to a "loading circle" and error object does not support method "includes" (by @omiroshnichenko) - #18991: #10440: [Forwardport] Missing $debugHintsPath when sending email via command. (by @p-bystritsky) - #18988: [Forwardport] #17890: show correct text swatch values per store view (by @nmalevanec) - #18650: issue fixed -Wrong order total in customer information orders tab in admin panel (by @anujwebkul) - #18938: issue #18931 fixed. (by @ayazwebkul) - #18968: Fix numeric translation keys being dissolved by array_merge (by @tdgroot) - #18680: fix: cache count() results for loops (by @DanielRuf) - magento-engcom/import-export-improvements#142: Added $websiteString property to test class (by @maxalmonte14) - #18810: magento-engcom/import-export-improvements#51: fix for uploader filepath (by @sawebvisum) - #18083: Convert string to DateTime object for languages other than English (by @bnymn) - #18462: [forwardport 2.3] fix Fatal Error when save configurable product in Magento 2.2.5 #18082 #18461 (by @thiagolima-bm) Fixed GitHub Issues: - #19060: User created by admin cannot login (reported by @tomekjordan) has been fixed in #19066 by @progreg in 2.3-develop branch Related commits: 1. ed66491 - #18256: Reset password throws error since 2.2.6 (reported by @edwinbos) has been fixed in #19026 by @p-bystritsky in 2.3-develop branch Related commits: 1. bc8d3d5 - #18323: Order confirmation email for guest checkout does not include download links (reported by @hsray) has been fixed in #19040 by @swnsma in 2.3-develop branch Related commits: 1. 5dc7add 2. e19d70e - #19003: salesInvoiceOrder REST API does not make downloadable products available (reported by @nthurston) has been fixed in #19040 by @swnsma in 2.3-develop branch Related commits: 1. 5dc7add 2. e19d70e - #19034: sales_order_item_save_commit_after and sales_order_save_commit_after events will never fire for guest checkout (reported by @swnsma) has been fixed in #19040 by @swnsma in 2.3-develop branch Related commits: 1. 5dc7add 2. e19d70e - #10048: WYSIWYG unable to set default value in ui component (reported by @milansimek) has been fixed in #19048 by @omiroshnichenko in 2.3-develop branch Related commits: 1. 70743fa - #18901: Forgot password form should not available while customer is logged in. (reported by @webkul-ratnesh) has been fixed in #19029 by @agorbulin in 2.3-develop branch Related commits: 1. 76d478f - #18562: Internet Explorer 11: Edit customer in backend leads sometimes to a "loading circle" and error object does not support method "includes" (reported by @amenk) has been fixed in #19010 by @omiroshnichenko in 2.3-develop branch Related commits: 1. ed26e55 - #10440: Missing $debugHintsPath when sending email via command (reported by @cykirsch) has been fixed in #18991 by @p-bystritsky in 2.3-develop branch Related commits: 1. 7c86822 - #17890: Magento 2.2.5 Product swatches does not shows correct value for related store view (reported by @magicaner) has been fixed in #18988 by @nmalevanec in 2.3-develop branch Related commits: 1. f359bbc - #18618: Wrong order total in customer information orders tab in admin panel (reported by @LordHansolo) has been fixed in #18650 by @anujwebkul in 2.3-develop branch Related commits: 1. 11290c5 - #18931: Product added to shopping cart / comparison list message not translated by default (reported by @arnoudhgz) has been fixed in #18938 by @ayazwebkul in 2.3-develop branch Related commits: 1. 4c25f0e 2. d64351b - #5037: Datetime Error on Newsletter Template (reported by @davideperrotta) has been fixed in #18083 by @bnymn in 2.3-develop branch Related commits: 1. ae42612 2. c4fa85b 3. 6bda779 4. a4f80a9 5. 14d9528 6. da580fc 7. 16a7f0b 8. 9315dd6 9. 42cd228 10. ddeaf36 11. 6cc9034 12. 28617c0 13. fd0ab03 14. 1b03c19 15. c6c2ffe 16. 502e5ac 17. 51e8fe7 18. a8c7768 19. 127b1b8 20. 526bfc9 21. edc962d 22. 4fe8c7a 23. e27de55 24. 0d0c210 - #18082: Fatal Error when save configurable product in Magento 2.2.5 (reported by @vpatidar009) has been fixed in #18462 by @thiagolima-bm in 2.3-develop branch Related commits: 1. cc16df9 2. 7711165
2 parents 53a8966 + 67bc162 commit 9186f4a

File tree

37 files changed

+245
-94
lines changed

37 files changed

+245
-94
lines changed

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ public function testGetAllWebsitesValue()
103103
$this->webSiteModel->expects($this->once())->method('getBaseCurrency')->willReturn($currency);
104104

105105
$expectedResult = AdvancedPricing::VALUE_ALL_WEBSITES . ' [' . $currencyCode . ']';
106-
$this->websiteString = $this->getMockBuilder(
106+
$websiteString = $this->getMockBuilder(
107107
\Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator\Website::class
108108
)
109109
->setMethods(['_clearMessages', '_addMessages'])
110110
->setConstructorArgs([$this->storeResolver, $this->webSiteModel])
111111
->getMock();
112-
$result = $this->websiteString->getAllWebsitesValue();
112+
$result = $websiteString->getAllWebsitesValue();
113113

114114
$this->assertEquals($expectedResult, $result);
115115
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ Products,Products
233233
"This attribute set no longer exists.","This attribute set no longer exists."
234234
"You saved the attribute set.","You saved the attribute set."
235235
"Something went wrong while saving the attribute set.","Something went wrong while saving the attribute set."
236-
"You added product %1 to the comparison list.","You added product %1 to the comparison list."
237236
"You cleared the comparison list.","You cleared the comparison list."
238237
"Something went wrong clearing the comparison list.","Something went wrong clearing the comparison list."
239238
"You removed product %1 from the comparison list.","You removed product %1 from the comparison list."
@@ -808,4 +807,5 @@ Details,Details
808807
"Product Name or SKU", "Product Name or SKU"
809808
"Start typing to find products", "Start typing to find products"
810809
"Product with ID: (%1) doesn't exist", "Product with ID: (%1) doesn't exist"
811-
"Category with ID: (%1) doesn't exist", "Category with ID: (%1) doesn't exist"
810+
"Category with ID: (%1) doesn't exist", "Category with ID: (%1) doesn't exist"
811+
"You added product %1 to the <a href=""%2"">comparison list</a>.","You added product %1 to the <a href=""%2"">comparison list</a>."

app/code/Magento/CatalogImportExport/Model/Import/Uploader.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class Uploader extends \Magento\MediaStorage\Model\File\Uploader
101101
* @param \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $validator
102102
* @param \Magento\Framework\Filesystem $filesystem
103103
* @param \Magento\Framework\Filesystem\File\ReadFactory $readFactory
104-
* @param null $filePath
104+
* @param null|string $filePath
105105
* @throws \Magento\Framework\Exception\LocalizedException
106106
*/
107107
public function __construct(
@@ -113,15 +113,15 @@ public function __construct(
113113
\Magento\Framework\Filesystem\File\ReadFactory $readFactory,
114114
$filePath = null
115115
) {
116-
if ($filePath !== null) {
117-
$this->_setUploadFile($filePath);
118-
}
119116
$this->_imageFactory = $imageFactory;
120117
$this->_coreFileStorageDb = $coreFileStorageDb;
121118
$this->_coreFileStorage = $coreFileStorage;
122119
$this->_validator = $validator;
123120
$this->_directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
124121
$this->_readFactory = $readFactory;
122+
if ($filePath !== null) {
123+
$this->_setUploadFile($filePath);
124+
}
125125
}
126126

127127
/**
@@ -353,7 +353,7 @@ protected function _moveFile($tmpPath, $destPath)
353353
}
354354

355355
/**
356-
* {@inheritdoc}
356+
* @inheritdoc
357357
*/
358358
protected function chmod($file)
359359
{

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,4 @@ Payment,Payment
182182
"Items in Cart","Items in Cart"
183183
"Close","Close"
184184
"Show Cross-sell Items in the Shopping Cart","Show Cross-sell Items in the Shopping Cart"
185+
"You added %1 to your <a href=""%2"">shopping cart</a>.","You added %1 to your <a href=""%2"">shopping cart</a>."

app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Configurable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ protected function getVariationMatrix()
158158
$configurableMatrix = json_decode($configurableMatrix, true);
159159

160160
foreach ($configurableMatrix as $item) {
161-
if ($item['newProduct']) {
161+
if (isset($item['newProduct']) && $item['newProduct']) {
162162
$result[$item['variationKey']] = $this->mapData($item);
163163

164164
if (isset($item['qty'])) {

app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function __construct(
5757
}
5858

5959
/**
60-
* {@inheritdoc}
60+
* @inheritdoc
6161
*/
6262
protected function _construct()
6363
{
@@ -102,7 +102,7 @@ protected function _prepareCollection()
102102
}
103103

104104
/**
105-
* {@inheritdoc}
105+
* @inheritdoc
106106
*/
107107
protected function _prepareColumns()
108108
{
@@ -123,7 +123,8 @@ protected function _prepareColumns()
123123
'header' => __('Order Total'),
124124
'index' => 'grand_total',
125125
'type' => 'currency',
126-
'currency' => 'order_currency_code'
126+
'currency' => 'order_currency_code',
127+
'rate' => 1
127128
]
128129
);
129130

@@ -162,7 +163,7 @@ public function getRowUrl($row)
162163
}
163164

164165
/**
165-
* {@inheritdoc}
166+
* @inheritdoc
166167
*/
167168
public function getGridUrl()
168169
{

app/code/Magento/Customer/Controller/Account/ForgotPassword.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
@@ -11,6 +10,9 @@
1110
use Magento\Framework\App\Action\Context;
1211
use Magento\Framework\View\Result\PageFactory;
1312

13+
/**
14+
* Forgot Password controller
15+
*/
1416
class ForgotPassword extends \Magento\Customer\Controller\AbstractAccount implements HttpGetActionInterface
1517
{
1618
/**
@@ -41,10 +43,17 @@ public function __construct(
4143
/**
4244
* Forgot customer password page
4345
*
44-
* @return \Magento\Framework\View\Result\Page
46+
* @return \Magento\Framework\Controller\Result\Redirect|\Magento\Framework\View\Result\Page
4547
*/
4648
public function execute()
4749
{
50+
if ($this->session->isLoggedIn()) {
51+
/** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
52+
$resultRedirect = $this->resultRedirectFactory->create();
53+
$resultRedirect->setPath('*/*/');
54+
return $resultRedirect;
55+
}
56+
4857
/** @var \Magento\Framework\View\Result\Page $resultPage */
4958
$resultPage = $this->resultPageFactory->create();
5059
$resultPage->getLayout()->getBlock('forgotPassword')->setEmailValue($this->session->getForgottenEmail());

app/code/Magento/Customer/Model/AccountManagement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,8 @@ public function resetPassword($email, $resetToken, $newPassword)
681681
$customerSecure->setRpToken(null);
682682
$customerSecure->setRpTokenCreatedAt(null);
683683
$customerSecure->setPasswordHash($this->createPasswordHash($newPassword));
684-
$this->sessionManager->destroy();
685684
$this->destroyCustomerSessions($customer->getId());
685+
$this->sessionManager->destroy();
686686
$this->customerRepository->save($customer);
687687

688688
return true;

app/code/Magento/Customer/Model/Authentication.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function __construct(
8383
}
8484

8585
/**
86-
* {@inheritdoc}
86+
* @inheritdoc
8787
*/
8888
public function processAuthenticationFailure($customerId)
8989
{
@@ -120,7 +120,7 @@ public function processAuthenticationFailure($customerId)
120120
}
121121

122122
/**
123-
* {@inheritdoc}
123+
* @inheritdoc
124124
*/
125125
public function unlock($customerId)
126126
{
@@ -152,7 +152,7 @@ protected function getMaxFailures()
152152
}
153153

154154
/**
155-
* {@inheritdoc}
155+
* @inheritdoc
156156
*/
157157
public function isLocked($customerId)
158158
{
@@ -161,13 +161,13 @@ public function isLocked($customerId)
161161
}
162162

163163
/**
164-
* {@inheritdoc}
164+
* @inheritdoc
165165
*/
166166
public function authenticate($customerId, $password)
167167
{
168168
$customerSecure = $this->customerRegistry->retrieveSecureData($customerId);
169169
$hash = $customerSecure->getPasswordHash();
170-
if (!$this->encryptor->validateHash($password, $hash)) {
170+
if (!$hash || !$this->encryptor->validateHash($password, $hash)) {
171171
$this->processAuthenticationFailure($customerId);
172172
if ($this->isLocked($customerId)) {
173173
throw new UserLockedException(__('The account is locked.'));

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,12 @@
240240
</argument>
241241
</arguments>
242242
</type>
243+
244+
<type name="Magento\Developer\Model\TemplateEngine\Plugin\DebugHints">
245+
<arguments>
246+
<argument name="debugHintsPath" xsi:type="string">dev/debug/template_hints_storefront</argument>
247+
<argument name="debugHintsWithParam" xsi:type="string">dev/debug/template_hints_storefront_show_with_parameter</argument>
248+
<argument name="debugHintsParameter" xsi:type="string">dev/debug/template_hints_parameter_value</argument>
249+
</arguments>
250+
</type>
243251
</config>

app/code/Magento/Developer/etc/frontend/di.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,4 @@
99
<type name="Magento\Framework\View\TemplateEngineFactory">
1010
<plugin name="debug_hints" type="Magento\Developer\Model\TemplateEngine\Plugin\DebugHints" sortOrder="10"/>
1111
</type>
12-
<type name="Magento\Developer\Model\TemplateEngine\Plugin\DebugHints">
13-
<arguments>
14-
<argument name="debugHintsPath" xsi:type="string">dev/debug/template_hints_storefront</argument>
15-
<argument name="debugHintsWithParam" xsi:type="string">dev/debug/template_hints_storefront_show_with_parameter</argument>
16-
<argument name="debugHintsParameter" xsi:type="string">dev/debug/template_hints_parameter_value</argument>
17-
</arguments>
18-
</type>
1912
</config>

app/code/Magento/Downloadable/etc/events.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
9-
<event name="sales_order_item_save_commit_after">
9+
<event name="sales_order_item_save_after">
1010
<observer name="downloadable_observer" instance="Magento\Downloadable\Observer\SaveDownloadableOrderItemObserver" />
1111
</event>
12-
<event name="sales_order_save_commit_after">
12+
<event name="sales_order_save_after">
1313
<observer name="downloadable_observer" instance="Magento\Downloadable\Observer\SetLinkStatusObserver" />
1414
</event>
1515
<event name="sales_model_service_quote_submit_success">

app/code/Magento/Newsletter/Model/Queue.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\Framework\App\TemplateTypesInterface;
99
use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
10+
use Magento\Framework\Stdlib\DateTime\Timezone\LocalizedDateToUtcConverterInterface;
1011

1112
/**
1213
* Newsletter queue model.
@@ -117,6 +118,11 @@ class Queue extends \Magento\Framework\Model\AbstractModel implements TemplateTy
117118
*/
118119
private $timezone;
119120

121+
/**
122+
* @var LocalizedDateToUtcConverterInterface
123+
*/
124+
private $utcConverter;
125+
120126
/**
121127
* @param \Magento\Framework\Model\Context $context
122128
* @param \Magento\Framework\Registry $registry
@@ -130,6 +136,7 @@ class Queue extends \Magento\Framework\Model\AbstractModel implements TemplateTy
130136
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
131137
* @param array $data
132138
* @param TimezoneInterface $timezone
139+
* @param LocalizedDateToUtcConverterInterface $utcConverter
133140
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
134141
*/
135142
public function __construct(
@@ -144,7 +151,8 @@ public function __construct(
144151
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
145152
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
146153
array $data = [],
147-
TimezoneInterface $timezone = null
154+
TimezoneInterface $timezone = null,
155+
LocalizedDateToUtcConverterInterface $utcConverter = null
148156
) {
149157
parent::__construct(
150158
$context,
@@ -159,9 +167,10 @@ public function __construct(
159167
$this->_problemFactory = $problemFactory;
160168
$this->_subscribersCollection = $subscriberCollectionFactory->create();
161169
$this->_transportBuilder = $transportBuilder;
162-
$this->timezone = $timezone ?: \Magento\Framework\App\ObjectManager::getInstance()->get(
163-
TimezoneInterface::class
164-
);
170+
171+
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
172+
$this->timezone = $timezone ?: $objectManager->get(TimezoneInterface::class);
173+
$this->utcConverter = $utcConverter ?? $objectManager->get(LocalizedDateToUtcConverterInterface::class);
165174
}
166175

167176
/**
@@ -196,7 +205,7 @@ public function setQueueStartAtByString($startAt)
196205
if ($startAt === null || $startAt == '') {
197206
$this->setQueueStartAt(null);
198207
} else {
199-
$this->setQueueStartAt($this->timezone->convertConfigTimeToUtc($startAt));
208+
$this->setQueueStartAt($this->utcConverter->convertLocalizedDateToUtc($startAt));
200209
}
201210
return $this;
202211
}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@ Subscribers,Subscribers
6767
"Something went wrong while saving this template.","Something went wrong while saving this template."
6868
"Newsletter Subscription","Newsletter Subscription"
6969
"Something went wrong while saving your subscription.","Something went wrong while saving your subscription."
70-
"We saved the subscription.","We saved the subscription."
71-
"We removed the subscription.","We removed the subscription."
70+
"We have saved your subscription.","We have saved your subscription."
71+
"We have removed your newsletter subscription.","We have removed your newsletter subscription."
7272
"Your subscription has been confirmed.","Your subscription has been confirmed."
7373
"This is an invalid subscription confirmation code.","This is an invalid subscription confirmation code."
7474
"This is an invalid subscription ID.","This is an invalid subscription ID."
7575
"This email address is already assigned to another user.","This email address is already assigned to another user."
7676
"Sorry, but the administrator denied subscription for guests. Please <a href=""%1"">register</a>.","Sorry, but the administrator denied subscription for guests. Please <a href=""%1"">register</a>."
7777
"Please enter a valid email address.","Please enter a valid email address."
7878
"This email address is already subscribed.","This email address is already subscribed."
79-
"The confirmation request has been sent.","The confirmation request has been sent."
79+
"A confirmation request has been sent.","A confirmation request has been sent."
8080
"Thank you for your subscription.","Thank you for your subscription."
8181
"There was a problem with the subscription: %1","There was a problem with the subscription: %1"
8282
"Something went wrong with the subscription.","Something went wrong with the subscription."
@@ -151,3 +151,4 @@ Unconfirmed,Unconfirmed
151151
Store,Store
152152
"Store View","Store View"
153153
"Newsletter Subscriptions","Newsletter Subscriptions"
154+
"We have updated your subscription.","We have updated your subscription."

0 commit comments

Comments
 (0)