From 236bda494b6413d82909a67d811ba29b6feab457 Mon Sep 17 00:00:00 2001 From: Aria Stewart Date: Fri, 11 Aug 2017 13:35:35 -0400 Subject: [PATCH 1/5] Fix swagger-ui on instances of Magento running on a non-standard port --- app/code/Magento/Webapi/Controller/Rest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Webapi/Controller/Rest.php b/app/code/Magento/Webapi/Controller/Rest.php index 78b3ad8b9c472..4507c594dce52 100644 --- a/app/code/Magento/Webapi/Controller/Rest.php +++ b/app/code/Magento/Webapi/Controller/Rest.php @@ -281,7 +281,7 @@ protected function processSchemaRequest() $responseBody = $this->swaggerGenerator->generate( $requestedServices, $this->_request->getScheme(), - $this->_request->getHttpHost(), + $this->_request->getHttpHost(false), $this->_request->getRequestUri() ); $this->_response->setBody($responseBody)->setHeader('Content-Type', 'application/json'); From f735e3d6f0ca6ca8858da9c4595368748490a294 Mon Sep 17 00:00:00 2001 From: Anton Evers Date: Mon, 21 Aug 2017 15:33:42 +0600 Subject: [PATCH 2/5] Bug fix, prevent displaying `0000-00-00 00:00:00` as anything else in admin grids --- app/code/Magento/Ui/Component/Listing/Columns/Date.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Ui/Component/Listing/Columns/Date.php b/app/code/Magento/Ui/Component/Listing/Columns/Date.php index 94f6ca65e83bf..78b02a63d172e 100644 --- a/app/code/Magento/Ui/Component/Listing/Columns/Date.php +++ b/app/code/Magento/Ui/Component/Listing/Columns/Date.php @@ -53,7 +53,9 @@ public function prepareDataSource(array $dataSource) { if (isset($dataSource['data']['items'])) { foreach ($dataSource['data']['items'] as & $item) { - if (isset($item[$this->getData('name')])) { + if (isset($item[$this->getData('name')]) + && $item[$this->getData('name')] !== "0000-00-00 00:00:00" + ) { $date = $this->timezone->date(new \DateTime($item[$this->getData('name')])); $timezone = isset($this->getConfiguration()['timezone']) ? $this->booleanUtils->convert($this->getConfiguration()['timezone']) From e8af99b41528ad7382558902eb1f873bcea2918c Mon Sep 17 00:00:00 2001 From: Riccardo Tempesta Date: Tue, 22 Aug 2017 08:18:11 +0200 Subject: [PATCH 3/5] FIX for issue 9930 - Asymmetric Transaction Error with ElasticSearch --- app/code/Magento/Catalog/Model/Product/Gallery/Processor.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/Processor.php b/app/code/Magento/Catalog/Model/Product/Gallery/Processor.php index d5ad9a8ea1138..080ed0cc54088 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/Processor.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/Processor.php @@ -193,6 +193,7 @@ public function addImage( $mediaGalleryData['images'][] = [ 'file' => $fileName, 'position' => $position, + 'media_type' => 'image', 'label' => '', 'disabled' => (int)$exclude, ]; From 2f513bcdd47f43390e483968244d8f61b2bcb78d Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov Date: Tue, 22 Aug 2017 13:44:58 +0300 Subject: [PATCH 4/5] Bug fix, prevent displaying `0000-00-00 00:00:00` as anything else in admin grids #10598 - Unit test added --- .../Test/Unit/Component/Listing/Columns/DateTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/code/Magento/Ui/Test/Unit/Component/Listing/Columns/DateTest.php b/app/code/Magento/Ui/Test/Unit/Component/Listing/Columns/DateTest.php index 0bfb2a7dc0f34..045f11fe688f4 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/Listing/Columns/DateTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/Listing/Columns/DateTest.php @@ -89,4 +89,14 @@ public function testPrepareDataSource() $result = $this->model->prepareDataSource(['data' => ['items' => [$item]]]); $this->assertEquals(self::TEST_TIME, $result['data']['items'][0]['field_name']); } + + public function testPrepareDataSourceWithZeroDate() + { + $zeroDate = '0000-00-00 00:00:00'; + $item = ['test_data' => 'some_data', 'field_name' => $zeroDate]; + $this->timezoneMock->expects($this->never())->method('date'); + + $result = $this->model->prepareDataSource(['data' => ['items' => [$item]]]); + $this->assertEquals($zeroDate, $result['data']['items'][0]['field_name']); + } } From c7de684859b704a87e05925417d39a807d79a34b Mon Sep 17 00:00:00 2001 From: Parker Smith Date: Tue, 22 Aug 2017 16:46:43 -0700 Subject: [PATCH 5/5] Grammar fix for #9533 --- app/code/Magento/Customer/i18n/en_US.csv | 4 ++-- .../view/frontend/web/template/authentication-popup.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Customer/i18n/en_US.csv b/app/code/Magento/Customer/i18n/en_US.csv index d5d4f5a0db8f6..1db22ebf2d93a 100644 --- a/app/code/Magento/Customer/i18n/en_US.csv +++ b/app/code/Magento/Customer/i18n/en_US.csv @@ -400,12 +400,12 @@ Password:,Password: "If you did not make this request, you can ignore this email and your password will remain the same.","If you did not make this request, you can ignore this email and your password will remain the same." "Your %store_name password has been changed","Your %store_name password has been changed" "We have received a request to change the following information associated with your account at %store_name: password.","We have received a request to change the following information associated with your account at %store_name: password." -"Checkout out as a new customer","Checkout out as a new customer" +"Checkout as a new customer","Checkout as a new customer" "Creating an account has many benefits:","Creating an account has many benefits:" "See order and shipping status","See order and shipping status" "Track order history","Track order history" "Check out faster","Check out faster" -"Checkout out using your account","Checkout out using your account" +"Checkout using your account","Checkout using your account" "Email Address","Email Address" "Are you sure you want to do this?","Are you sure you want to do this?" "Are you sure you want to delete this address?","Are you sure you want to delete this address?" diff --git a/app/code/Magento/Customer/view/frontend/web/template/authentication-popup.html b/app/code/Magento/Customer/view/frontend/web/template/authentication-popup.html index b7b32203c0d7a..ad3d62f6c1c27 100644 --- a/app/code/Magento/Customer/view/frontend/web/template/authentication-popup.html +++ b/app/code/Magento/Customer/view/frontend/web/template/authentication-popup.html @@ -14,7 +14,7 @@ + data-bind="i18n: 'Checkout as a new customer'">

@@ -39,7 +39,7 @@ + data-bind="i18n: 'Checkout using your account'">