diff --git a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html index 74621806fa5fbeaff5b183fcd5ebdd2164882357..891ad48b33effb8eecae0b909b4ace1e6cd89516 100644 --- a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html +++ b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html @@ -85,7 +85,7 @@ <div class="messages"> <div class="message message-notice notice"> <span - translate="'Search strings are either normal strings or regular exceptions (PCRE). They are matched in the same order as entered.'"></span> + translate="'Search strings are either normal strings or regular expressions (PCRE). They are matched in the same order as entered.'"></span> <br> <span translate="'Examples'"></span>: diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/default.js b/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/default.js index b2a273513181d113ee60af197622ea1965601eff..3a6574bff8948aa14ae218d23ae91adbed8e812f 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/default.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/default.js @@ -12,7 +12,8 @@ define([ 'Magento_Checkout/js/model/payment/method-converter', 'Magento_Checkout/js/model/error-processor', 'Magento_Checkout/js/model/full-screen-loader', - 'Magento_Checkout/js/action/select-billing-address' + 'Magento_Checkout/js/action/select-billing-address', + 'Magento_Checkout/js/model/shipping-save-processor/payload-extender' ], function ( ko, quote, @@ -22,7 +23,8 @@ define([ methodConverter, errorProcessor, fullScreenLoader, - selectBillingAddressAction + selectBillingAddressAction, + payloadExtender ) { 'use strict'; @@ -46,6 +48,8 @@ define([ } }; + payloadExtender(payload); + fullScreenLoader.startLoader(); return storage.post( diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/payload-extender.js b/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/payload-extender.js new file mode 100644 index 0000000000000000000000000000000000000000..9a082a056a3824545ee7afc5fc361255e3f6d62c --- /dev/null +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/payload-extender.js @@ -0,0 +1,13 @@ +/** + * Copyright © 2013-2017 Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +define(function () { + 'use strict'; + + return function (payload) { + payload.addressInformation['extension_attributes'] = {}; + + return payload; + }; +}); diff --git a/app/code/Magento/Cms/i18n/en_US.csv b/app/code/Magento/Cms/i18n/en_US.csv index 983493bb7732a13efc69949daccb9e77a2f3b337..e4989777593f8477472009377f897017d9010e49 100644 --- a/app/code/Magento/Cms/i18n/en_US.csv +++ b/app/code/Magento/Cms/i18n/en_US.csv @@ -133,7 +133,7 @@ Block,Block "Enable Page","Enable Page" Content,Content "Content Heading","Content Heading" -"Search Engine Optimisation","Search Engine Optimisation" +"Search Engine Optimization","Search Engine Optimization" "Meta Title","Meta Title" "Meta Keywords","Meta Keywords" "Meta Description","Meta Description" diff --git a/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml b/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml index f8c4f07bd4336cc87f0916a350782558a1e7290a..5441481f6cea2b38f4edda7712384cfc06d43b0e 100644 --- a/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml +++ b/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml @@ -141,7 +141,7 @@ <fieldset name="search_engine_optimisation" sortOrder="20"> <settings> <collapsible>true</collapsible> - <label translate="true">Search Engine Optimisation</label> + <label translate="true">Search Engine Optimization</label> </settings> <field name="identifier" formElement="input"> <argument name="data" xsi:type="array"> diff --git a/app/code/Magento/GoogleOptimizer/view/adminhtml/ui_component/cms_page_form.xml b/app/code/Magento/GoogleOptimizer/view/adminhtml/ui_component/cms_page_form.xml index 735de2bd7b177edd70e6a7297c417b5554a096d9..cc9249b2d3d38b5c61e76ad546bdaef7fb80db01 100644 --- a/app/code/Magento/GoogleOptimizer/view/adminhtml/ui_component/cms_page_form.xml +++ b/app/code/Magento/GoogleOptimizer/view/adminhtml/ui_component/cms_page_form.xml @@ -13,7 +13,12 @@ </settings> <container name="google_experiment_container" sortOrder="250"> <htmlContent name="html_content"> - <block name="googleOptimizerBlockAdminhtmlFormCmsPage" class="Magento\GoogleOptimizer\Block\Adminhtml\Form\CmsPage" /> + <block name="googleOptimizerBlockAdminhtmlFormCmsPage" class="Magento\GoogleOptimizer\Block\Adminhtml\Form\CmsPage"> + <arguments> + <argument name="code-entity" xsi:type="string">Magento\GoogleOptimizer\Block\Adminhtml\Cms\Page\EntityCmsPage</argument> + <argument name="form-name" xsi:type="string">cms_page_form</argument> + </arguments> + </block> </htmlContent> </container> </fieldset> diff --git a/app/code/Magento/Indexer/Model/Indexer.php b/app/code/Magento/Indexer/Model/Indexer.php index 412611d1dffd6a639035d45cda7298af7d7c167e..9faf5e7b728cdd5b1e8b5f20a06cd13a6f2c8dae 100644 --- a/app/code/Magento/Indexer/Model/Indexer.php +++ b/app/code/Magento/Indexer/Model/Indexer.php @@ -418,6 +418,11 @@ class Indexer extends \Magento\Framework\DataObject implements IdxInterface $state->save(); $this->getView()->resume(); throw $exception; + } catch (\Error $error) { + $state->setStatus(StateInterface::STATUS_INVALID); + $state->save(); + $this->getView()->resume(); + throw $error; } } } diff --git a/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php b/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php index 2c25c698dd425172b9c27798e76707754cae5d6f..e9c82906121cc31687ee8182a05ec1501b79c7a7 100644 --- a/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php @@ -273,6 +273,56 @@ class IndexerTest extends \PHPUnit\Framework\TestCase $this->model->reindexAll(); } + /** + * @expectedException \Error + * @expectedExceptionMessage Test Engine Error + */ + public function testReindexAllWithError() + { + + $indexId = 'indexer_internal_name'; + $this->loadIndexer($indexId); + + $stateMock = $this->createPartialMock( + \Magento\Indexer\Model\Indexer\State::class, + ['load', 'getId', 'setIndexerId', '__wakeup', 'getStatus', 'setStatus', 'save'] + ); + $stateMock->expects($this->once())->method('load')->with($indexId, 'indexer_id')->will($this->returnSelf()); + $stateMock->expects($this->never())->method('setIndexerId'); + $stateMock->expects($this->once())->method('getId')->will($this->returnValue(1)); + $stateMock->expects($this->exactly(2))->method('setStatus')->will($this->returnSelf()); + $stateMock->expects($this->once())->method('getStatus')->will($this->returnValue('idle')); + $stateMock->expects($this->exactly(2))->method('save')->will($this->returnSelf()); + $this->stateFactoryMock->expects($this->once())->method('create')->will($this->returnValue($stateMock)); + + $this->viewMock->expects($this->once())->method('isEnabled')->will($this->returnValue(false)); + $this->viewMock->expects($this->never())->method('suspend'); + $this->viewMock->expects($this->once())->method('resume'); + + $actionMock = $this->createPartialMock( + \Magento\Framework\Indexer\ActionInterface::class, + ['executeFull', 'executeList', 'executeRow'] + ); + $actionMock->expects($this->once())->method('executeFull')->will( + $this->returnCallback( + function () { + throw new \Error('Test Engine Error'); + } + ) + ); + $this->actionFactoryMock->expects( + $this->once() + )->method( + 'create' + )->with( + 'Some\Class\Name' + )->will( + $this->returnValue($actionMock) + ); + + $this->model->reindexAll(); + } + protected function getIndexerData() { return [ diff --git a/app/code/Magento/Quote/Model/QuoteRepository.php b/app/code/Magento/Quote/Model/QuoteRepository.php index 01c21bbbe50a7790d0569672294bcbefe58e60bd..d3967794b300aafc01c785ecb5d8f2bed5a75dc7 100644 --- a/app/code/Magento/Quote/Model/QuoteRepository.php +++ b/app/code/Magento/Quote/Model/QuoteRepository.php @@ -212,7 +212,7 @@ class QuoteRepository implements \Magento\Quote\Api\CartRepositoryInterface if ($sharedStoreIds) { $quote->setSharedStoreIds($sharedStoreIds); } - $quote->setStoreId($this->storeManager->getStore()->getId())->$loadMethod($identifier); + $quote->$loadMethod($identifier)->setStoreId($this->storeManager->getStore()->getId()); if (!$quote->getId()) { throw NoSuchEntityException::singleField($loadField, $identifier); } diff --git a/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml index 20c2c1869fedbd6c56f42d99320c0686ebb27c45..1fca65932b0b0c2c474dd2d48f6cd2d4ee3ddf31 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml @@ -31,6 +31,6 @@ </td> <td class="item-qty"><?= /* @escapeNotVerified */ $_item->getQty() * 1 ?></td> <td class="item-price"> - <?= /* @escapeNotVerified */ $block->getItemPrice($_item) ?> + <?= /* @escapeNotVerified */ $block->getItemPrice($_item->getOrderItem()) ?> </td> </tr> diff --git a/app/code/Magento/Theme/view/frontend/templates/js/polyfill.phtml b/app/code/Magento/Theme/view/frontend/templates/js/polyfill.phtml index 7e8854b914261cf000b5af2c16fcb0386b277be2..2b75bd2222e26cdd142a0f8c1a0e7a8bb433907c 100644 --- a/app/code/Magento/Theme/view/frontend/templates/js/polyfill.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/js/polyfill.phtml @@ -126,7 +126,7 @@ }; window.localStorage.__proto__ = window.localStorage = new Storage('local'); - window.sessionStorage.__proto__ = window.sessionStorag = new Storage('session'); + window.sessionStorage.__proto__ = window.sessionStorage = new Storage('session'); })(); } </script> diff --git a/composer.json b/composer.json index 9d0edf0e54dcb9ae4e4c52d3016fae36ea8014e9..d67cce6c8b3f2d36c5196bd65f84f05b291f703d 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "magento/magento2ce", - "description": "Magento 2 (Community Edition)", + "description": "Magento 2 (Open Source)", "type": "project", "version": "2.2.1-dev", "license": [ diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/PageForm.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/PageForm.xml index 2ed1bdc790806ea459434f5f27ccac56558b428d..28de286b1411a096c4c0bf39b79de71dca86c265 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/PageForm.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/PageForm.xml @@ -68,7 +68,7 @@ </custom_design> <seo> <class>\Magento\Backend\Test\Block\Widget\Tab</class> - <selector>//div[div/strong/span[text()="Search Engine Optimisation"]]</selector> + <selector>//div[div/strong/span[text()="Search Engine Optimization"]]</selector> <strategy>xpath</strategy> <fields> <identifier /> diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php index 6e9b598cc8f4d2fd859ca57d430bc786907e83fe..03daa6c08fff4093e3d51c408a637643ab166f0c 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php @@ -57,7 +57,9 @@ class Multiselect extends AbstractElement $this->addClass('select multiselect admin__control-multiselect'); $html = ''; if ($this->getCanBeEmpty()) { - $html .= '<input type="hidden" name="' . parent::getName() . '" value="" />'; + $html .= ' + <input type="hidden" id="' . $this->getHtmlId() . '_hidden" name="' . parent::getName() . '" value="" /> + '; } if (!empty($this->_data['disabled'])) { $html .= '<input type="hidden" name="' . parent::getName() . '_disabled" value="" />'; diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php index 62b3329b2c5335f072e2c69e3598aa466cc6d5bb..6d1680a9f38a6da2a46a94503329dc4b8ad1d9da 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php @@ -27,10 +27,15 @@ class MultiselectTest extends \PHPUnit\Framework\TestCase public function testHiddenFieldPresentInMultiSelect() { $fieldName = 'fieldName'; + $fieldId = 'fieldId'; $this->_model->setCanBeEmpty(true); $this->_model->setName($fieldName); + $this->_model->setId($fieldId); $elementHtml = $this->_model->getElementHtml(); - $this->assertContains('<input type="hidden" name="' . $fieldName . '"', $elementHtml); + $this->assertContains( + '<input type="hidden" id="' . $fieldId . '_hidden" name="' . $fieldName . '"', + $elementHtml + ); } /** diff --git a/pub/media/.htaccess b/pub/media/.htaccess index 0a3087c096319f5d9974d643d33317ee0a4c4af2..28e65b490fbb897c50c6eac8da96a01dc36ee770 100644 --- a/pub/media/.htaccess +++ b/pub/media/.htaccess @@ -1,4 +1,4 @@ -Options All -Indexes +Options -Indexes <IfModule mod_php5.c> php_flag engine 0 diff --git a/pub/media/theme_customization/.htaccess b/pub/media/theme_customization/.htaccess index aaf15ab571ebff18a370d0485d762717def32b25..ae8ddd114d94ebf5b20f70f8bcd988aa9fab4511 100644 --- a/pub/media/theme_customization/.htaccess +++ b/pub/media/theme_customization/.htaccess @@ -1,4 +1,4 @@ -Options All -Indexes +Options -Indexes <Files ~ "\.xml$"> Order allow,deny Deny from all