Skip to content

Commit 1559745

Browse files
Merge branch '2.2.2-develop' of github.com:magento/magento2ce into MAGETWO-84882
2 parents c2c8ea2 + 7d3c6c8 commit 1559745

File tree

23 files changed

+374
-62
lines changed

23 files changed

+374
-62
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,22 @@
254254
<argument name="responseResolver" xsi:type="object">NotifyDataChangedResponseResolver</argument>
255255
</arguments>
256256
</type>
257+
<type name="Magento\Config\Model\Config\TypePool">
258+
<arguments>
259+
<argument name="sensitive" xsi:type="array">
260+
<item name="analytics/url/signup" xsi:type="string">1</item>
261+
<item name="analytics/url/update" xsi:type="string">1</item>
262+
<item name="analytics/url/bi_essentials" xsi:type="string">1</item>
263+
<item name="analytics/url/otp" xsi:type="string">1</item>
264+
<item name="analytics/url/report" xsi:type="string">1</item>
265+
<item name="analytics/url/notify_data_changed" xsi:type="string">1</item>
266+
<item name="analytics/general/token" xsi:type="string">1</item>
267+
</argument>
268+
<argument name="environment" xsi:type="array">
269+
<item name="crontab/default/jobs/analytics_collect_data/schedule/cron_expr" xsi:type="string">1</item>
270+
<item name="crontab/default/jobs/analytics_update/schedule/cron_expr" xsi:type="string">1</item>
271+
<item name="crontab/default/jobs/analytics_subscribe/schedule/cron_expr" xsi:type="string">1</item>
272+
</argument>
273+
</arguments>
274+
</type>
257275
</config>

app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Indexer/Price/Configurable.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ protected function _applyConfigurableOption()
133133
['le' => $this->getTable('catalog_product_entity')],
134134
'le.' . $linkField . ' = l.parent_id',
135135
['parent_id' => 'entity_id']
136+
)->join(
137+
['i' => $this->_getDefaultFinalPriceTable()],
138+
'le.entity_id = i.entity_id',
139+
[]
136140
);
137141

138142
$select = $connection->select();

app/code/Magento/Cron/Model/ResourceModel/Schedule.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,14 @@ public function trySetJobUniqueStatusAtomic($scheduleId, $newStatus, $currentSta
6666
{
6767
$connection = $this->getConnection();
6868

69-
$match = $connection->quoteInto('existing.job_code = current.job_code AND existing.status = ?', $newStatus);
69+
// this condition added to avoid cron jobs locking after incorrect termination of running job
70+
$match = $connection->quoteInto(
71+
'existing.job_code = current.job_code ' .
72+
'AND (existing.executed_at > UTC_TIMESTAMP() - INTERVAL 1 DAY OR existing.executed_at IS NULL) ' .
73+
'AND existing.status = ?',
74+
$newStatus
75+
);
76+
7077
$selectIfUnlocked = $connection->select()
7178
->joinLeft(
7279
['existing' => $this->getTable('cron_schedule')],
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Cron\Setup;
8+
9+
use Magento\Framework\Setup\InstallSchemaInterface;
10+
use Magento\Framework\Setup\ModuleContextInterface;
11+
use Magento\Framework\Setup\SchemaSetupInterface;
12+
13+
/**
14+
* Cron recurring setup
15+
*/
16+
class Recurring implements InstallSchemaInterface
17+
{
18+
/**
19+
* @var \Magento\Cron\Model\ResourceModel\Schedule
20+
*/
21+
private $schedule;
22+
23+
/**
24+
* Recurring constructor.
25+
* @param \Magento\Cron\Model\ResourceModel\Schedule $schedule
26+
*/
27+
public function __construct(
28+
\Magento\Cron\Model\ResourceModel\Schedule $schedule
29+
) {
30+
$this->schedule = $schedule;
31+
}
32+
33+
/**
34+
* {@inheritdoc}
35+
*/
36+
public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
37+
{
38+
$connection = $this->schedule->getConnection();
39+
$connection->update(
40+
$this->schedule->getMainTable(),
41+
[
42+
'status' => \Magento\Cron\Model\Schedule::STATUS_ERROR,
43+
'messages' => 'The job is terminated due to system upgrade'
44+
],
45+
$connection->quoteInto('status = ?', \Magento\Cron\Model\Schedule::STATUS_RUNNING)
46+
);
47+
}
48+
}

app/code/Magento/Customer/Block/Address/Edit.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,11 @@ protected function _prepareLayout()
139139

140140
if ($postedData = $this->_customerSession->getAddressFormData(true)) {
141141
$postedData['region'] = [
142-
'region_id' => $postedData['region_id'],
143-
'region' => $postedData['region'],
142+
'region' => $postedData['region'] ?? null,
144143
];
144+
if (!empty($postedData['region_id'])) {
145+
$postedData['region']['region_id'] = $postedData['region_id'];
146+
}
145147
$this->dataObjectHelper->populateWithArray(
146148
$this->_address,
147149
$postedData,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Magento\Customer\Api\AddressMetadataInterface;
99
use Magento\Customer\Api\AddressMetadataManagementInterface;
1010
use Magento\Customer\Model\Metadata\AttributeResolver;
11-
use Magento\Framework\App\Helper\Context;
1211

1312
/**
1413
* Customer attribute checker.

app/code/Magento/Customer/Test/Unit/Block/Address/EditTest.php

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ protected function setUp()
101101
);
102102
}
103103

104-
public function testSetLayoutWithOwnAddressAndPostedData()
104+
/**
105+
* @param array $postedData
106+
* @dataProvider postedDataProvider
107+
*/
108+
public function testSetLayoutWithOwnAddressAndPostedData(array $postedData)
105109
{
106110
$addressId = 1;
107111
$customerId = 1;
108112
$title = __('Edit Address');
109-
$postedData = [
110-
'region_id' => 1,
111-
'region' => 'region',
112-
];
113113
$newPostedData = $postedData;
114114
$newPostedData['region'] = $postedData;
115115

@@ -169,6 +169,21 @@ public function testSetLayoutWithOwnAddressAndPostedData()
169169
$this->assertEquals($layoutMock, $this->model->getLayout());
170170
}
171171

172+
/**
173+
* @return array
174+
*/
175+
public function postedDataProvider()
176+
{
177+
return [
178+
[
179+
['region_id' => 1, 'region' => 'region']
180+
],
181+
[
182+
['region' => 'region without id']
183+
]
184+
];
185+
}
186+
172187
/**
173188
* @throws \Magento\Framework\Exception\LocalizedException
174189
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)

app/code/Magento/Customer/view/frontend/templates/widget/telephone.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<?php
2020
$_validationClass = $block->escapeHtmlAttr(
2121
$this->helper('Magento\Customer\Helper\Address')
22-
->getAttributeValidationClass('fax')
22+
->getAttributeValidationClass('telephone')
2323
);
2424
?>
2525
<input type="text"

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
payment and shipping information to skip tedious checkout steps.</p>
1616
</div>
1717
<div class=""email-marketing-highlight"">
18-
<h3>Email Marketing Automation</span></h3>
18+
<h3>Email Marketing Automation</h3>
1919
<p>Send smarter, faster email campaigns with marketing automation from dotmailer, powered by
2020
your Magento store's live data.</p>
2121
</div>
@@ -34,7 +34,7 @@
3434
payment and shipping information to skip tedious checkout steps.</p>
3535
</div>
3636
<div class=""email-marketing-highlight"">
37-
<h3>Email Marketing Automation</span></h3>
37+
<h3>Email Marketing Automation</h3>
3838
<p>Send smarter, faster email campaigns with marketing automation from dotmailer, powered by
3939
your Magento store's live data.</p>
4040
</div>
@@ -65,26 +65,26 @@
6565
features include:
6666
</p>
6767
<ul>
68-
<li><span>Configurable “Instant Purchase” button to place orders</span></li>
68+
<li><span>Configurable “Instant Purchase” button to place orders.</span></li>
6969
<li><span>Support for all payment solutions using Braintree Vault, including Braintree Credit
7070
Card, Braintree PayPal, and PayPal Payflow Pro.</span></li>
7171
<li><span>Shipping to the customer’s default address using the lowest cost, available shipping
72-
method</span></li>
72+
method.</span></li>
7373
<li><span>Ability for developers to customize the Instant Purchase business logic to meet
74-
merchant needs</span></li>
74+
merchant needs.</span></li>
7575
</ul>","<p>Now you can deliver an Amazon-like experience with a new, streamlined checkout option.
7676
Logged-in customers can use previously-stored payment credentials and shipping information
7777
to skip steps, making the process faster and easier, especially for mobile shoppers. Key
7878
features include:
7979
</p>
8080
<ul>
81-
<li><span>Configurable “Instant Purchase” button to place orders</span></li>
81+
<li><span>Configurable “Instant Purchase” button to place orders.</span></li>
8282
<li><span>Support for all payment solutions using Braintree Vault, including Braintree Credit
8383
Card, Braintree PayPal, and PayPal Payflow Pro.</span></li>
8484
<li><span>Shipping to the customer’s default address using the lowest cost, available shipping
85-
method</span></li>
85+
method.</span></li>
8686
<li><span>Ability for developers to customize the Instant Purchase business logic to meet
87-
merchant needs</span></li>
87+
merchant needs.</span></li>
8888
</ul>"
8989
"Email Marketing Automation","Email Marketing Automation"
9090
"<p>Unlock an unparalleled level of insight and control of your eCommerce marketing with

app/code/Magento/ReleaseNotification/view/adminhtml/ui_component/release_notification.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
payment and shipping information to skip tedious checkout steps.</p>
7474
</div>
7575
<div class="email-marketing-highlight">
76-
<h3>Email Marketing Automation</span></h3>
76+
<h3>Email Marketing Automation</h3>
7777
<p>Send smarter, faster email campaigns with marketing automation from dotmailer, powered by
7878
your Magento store's live data.</p>
7979
</div>
@@ -226,13 +226,13 @@
226226
features include:
227227
</p>
228228
<ul>
229-
<li><span>Configurable “Instant Purchase” button to place orders</span></li>
229+
<li><span>Configurable “Instant Purchase” button to place orders.</span></li>
230230
<li><span>Support for all payment solutions using Braintree Vault, including Braintree Credit
231231
Card, Braintree PayPal, and PayPal Payflow Pro.</span></li>
232232
<li><span>Shipping to the customer’s default address using the lowest cost, available shipping
233-
method</span></li>
233+
method.</span></li>
234234
<li><span>Ability for developers to customize the Instant Purchase business logic to meet
235-
merchant needs</span></li>
235+
merchant needs.</span></li>
236236
</ul>]]>
237237
</item>
238238
</item>

0 commit comments

Comments
 (0)