Skip to content

Commit f69807f

Browse files
Merge branch '2.2-develop' of github.com:magento/magento2ce into MAGETWO-80205
2 parents 36cba1a + c06da29 commit f69807f

File tree

17 files changed

+99
-15
lines changed

17 files changed

+99
-15
lines changed

app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<div class="messages">
8686
<div class="message message-notice notice">
8787
<span
88-
translate="'Search strings are either normal strings or regular exceptions (PCRE). They are matched in the same order as entered.'"></span>
88+
translate="'Search strings are either normal strings or regular expressions (PCRE). They are matched in the same order as entered.'"></span>
8989
<br>
9090
<span
9191
translate="'Examples'"></span>:

app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/default.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ define([
1212
'Magento_Checkout/js/model/payment/method-converter',
1313
'Magento_Checkout/js/model/error-processor',
1414
'Magento_Checkout/js/model/full-screen-loader',
15-
'Magento_Checkout/js/action/select-billing-address'
15+
'Magento_Checkout/js/action/select-billing-address',
16+
'Magento_Checkout/js/model/shipping-save-processor/payload-extender'
1617
], function (
1718
ko,
1819
quote,
@@ -22,7 +23,8 @@ define([
2223
methodConverter,
2324
errorProcessor,
2425
fullScreenLoader,
25-
selectBillingAddressAction
26+
selectBillingAddressAction,
27+
payloadExtender
2628
) {
2729
'use strict';
2830

@@ -46,6 +48,8 @@ define([
4648
}
4749
};
4850

51+
payloadExtender(payload);
52+
4953
fullScreenLoader.startLoader();
5054

5155
return storage.post(
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
define(function () {
6+
'use strict';
7+
8+
return function (payload) {
9+
payload.addressInformation['extension_attributes'] = {};
10+
11+
return payload;
12+
};
13+
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Block,Block
133133
"Enable Page","Enable Page"
134134
Content,Content
135135
"Content Heading","Content Heading"
136-
"Search Engine Optimisation","Search Engine Optimisation"
136+
"Search Engine Optimization","Search Engine Optimization"
137137
"Meta Title","Meta Title"
138138
"Meta Keywords","Meta Keywords"
139139
"Meta Description","Meta Description"

app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
<fieldset name="search_engine_optimisation" sortOrder="20">
142142
<settings>
143143
<collapsible>true</collapsible>
144-
<label translate="true">Search Engine Optimisation</label>
144+
<label translate="true">Search Engine Optimization</label>
145145
</settings>
146146
<field name="identifier" formElement="input">
147147
<argument name="data" xsi:type="array">

app/code/Magento/GoogleOptimizer/view/adminhtml/ui_component/cms_page_form.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
</settings>
1414
<container name="google_experiment_container" sortOrder="250">
1515
<htmlContent name="html_content">
16-
<block name="googleOptimizerBlockAdminhtmlFormCmsPage" class="Magento\GoogleOptimizer\Block\Adminhtml\Form\CmsPage" />
16+
<block name="googleOptimizerBlockAdminhtmlFormCmsPage" class="Magento\GoogleOptimizer\Block\Adminhtml\Form\CmsPage">
17+
<arguments>
18+
<argument name="code-entity" xsi:type="string">Magento\GoogleOptimizer\Block\Adminhtml\Cms\Page\EntityCmsPage</argument>
19+
<argument name="form-name" xsi:type="string">cms_page_form</argument>
20+
</arguments>
21+
</block>
1722
</htmlContent>
1823
</container>
1924
</fieldset>

app/code/Magento/Indexer/Model/Indexer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,11 @@ public function reindexAll()
418418
$state->save();
419419
$this->getView()->resume();
420420
throw $exception;
421+
} catch (\Error $error) {
422+
$state->setStatus(StateInterface::STATUS_INVALID);
423+
$state->save();
424+
$this->getView()->resume();
425+
throw $error;
421426
}
422427
}
423428
}

app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,56 @@ function () {
273273
$this->model->reindexAll();
274274
}
275275

276+
/**
277+
* @expectedException \Error
278+
* @expectedExceptionMessage Test Engine Error
279+
*/
280+
public function testReindexAllWithError()
281+
{
282+
283+
$indexId = 'indexer_internal_name';
284+
$this->loadIndexer($indexId);
285+
286+
$stateMock = $this->createPartialMock(
287+
\Magento\Indexer\Model\Indexer\State::class,
288+
['load', 'getId', 'setIndexerId', '__wakeup', 'getStatus', 'setStatus', 'save']
289+
);
290+
$stateMock->expects($this->once())->method('load')->with($indexId, 'indexer_id')->will($this->returnSelf());
291+
$stateMock->expects($this->never())->method('setIndexerId');
292+
$stateMock->expects($this->once())->method('getId')->will($this->returnValue(1));
293+
$stateMock->expects($this->exactly(2))->method('setStatus')->will($this->returnSelf());
294+
$stateMock->expects($this->once())->method('getStatus')->will($this->returnValue('idle'));
295+
$stateMock->expects($this->exactly(2))->method('save')->will($this->returnSelf());
296+
$this->stateFactoryMock->expects($this->once())->method('create')->will($this->returnValue($stateMock));
297+
298+
$this->viewMock->expects($this->once())->method('isEnabled')->will($this->returnValue(false));
299+
$this->viewMock->expects($this->never())->method('suspend');
300+
$this->viewMock->expects($this->once())->method('resume');
301+
302+
$actionMock = $this->createPartialMock(
303+
\Magento\Framework\Indexer\ActionInterface::class,
304+
['executeFull', 'executeList', 'executeRow']
305+
);
306+
$actionMock->expects($this->once())->method('executeFull')->will(
307+
$this->returnCallback(
308+
function () {
309+
throw new \Error('Test Engine Error');
310+
}
311+
)
312+
);
313+
$this->actionFactoryMock->expects(
314+
$this->once()
315+
)->method(
316+
'create'
317+
)->with(
318+
'Some\Class\Name'
319+
)->will(
320+
$this->returnValue($actionMock)
321+
);
322+
323+
$this->model->reindexAll();
324+
}
325+
276326
protected function getIndexerData()
277327
{
278328
return [

app/code/Magento/Quote/Model/QuoteRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ protected function loadQuote($loadMethod, $loadField, $identifier, array $shared
212212
if ($sharedStoreIds) {
213213
$quote->setSharedStoreIds($sharedStoreIds);
214214
}
215-
$quote->setStoreId($this->storeManager->getStore()->getId())->$loadMethod($identifier);
215+
$quote->$loadMethod($identifier)->setStoreId($this->storeManager->getStore()->getId());
216216
if (!$quote->getId()) {
217217
throw NoSuchEntityException::singleField($loadField, $identifier);
218218
}

app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
</td>
3232
<td class="item-qty"><?= /* @escapeNotVerified */ $_item->getQty() * 1 ?></td>
3333
<td class="item-price">
34-
<?= /* @escapeNotVerified */ $block->getItemPrice($_item) ?>
34+
<?= /* @escapeNotVerified */ $block->getItemPrice($_item->getOrderItem()) ?>
3535
</td>
3636
</tr>

app/code/Magento/Theme/view/frontend/templates/js/polyfill.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
};
127127

128128
window.localStorage.__proto__ = window.localStorage = new Storage('local');
129-
window.sessionStorage.__proto__ = window.sessionStorag = new Storage('session');
129+
window.sessionStorage.__proto__ = window.sessionStorage = new Storage('session');
130130
})();
131131
}
132132
</script>

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "magento/magento2ce",
3-
"description": "Magento 2 (Community Edition)",
3+
"description": "Magento 2 (Open Source)",
44
"type": "project",
55
"version": "2.2.1-dev",
66
"license": [

dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/PageForm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
</custom_design>
6969
<seo>
7070
<class>\Magento\Backend\Test\Block\Widget\Tab</class>
71-
<selector>//div[div/strong/span[text()="Search Engine Optimisation"]]</selector>
71+
<selector>//div[div/strong/span[text()="Search Engine Optimization"]]</selector>
7272
<strategy>xpath</strategy>
7373
<fields>
7474
<identifier />

lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public function getElementHtml()
5757
$this->addClass('select multiselect admin__control-multiselect');
5858
$html = '';
5959
if ($this->getCanBeEmpty()) {
60-
$html .= '<input type="hidden" name="' . parent::getName() . '" value="" />';
60+
$html .= '
61+
<input type="hidden" id="' . $this->getHtmlId() . '_hidden" name="' . parent::getName() . '" value="" />
62+
';
6163
}
6264
if (!empty($this->_data['disabled'])) {
6365
$html .= '<input type="hidden" name="' . parent::getName() . '_disabled" value="" />';

lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,15 @@ protected function setUp()
2727
public function testHiddenFieldPresentInMultiSelect()
2828
{
2929
$fieldName = 'fieldName';
30+
$fieldId = 'fieldId';
3031
$this->_model->setCanBeEmpty(true);
3132
$this->_model->setName($fieldName);
33+
$this->_model->setId($fieldId);
3234
$elementHtml = $this->_model->getElementHtml();
33-
$this->assertContains('<input type="hidden" name="' . $fieldName . '"', $elementHtml);
35+
$this->assertContains(
36+
'<input type="hidden" id="' . $fieldId . '_hidden" name="' . $fieldName . '"',
37+
$elementHtml
38+
);
3439
}
3540

3641
/**

pub/media/.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Options All -Indexes
1+
Options -Indexes
22

33
<IfModule mod_php5.c>
44
php_flag engine 0

pub/media/theme_customization/.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Options All -Indexes
1+
Options -Indexes
22
<Files ~ "\.xml$">
33
Order allow,deny
44
Deny from all

0 commit comments

Comments
 (0)