diff --git a/CHANGELOG.md b/CHANGELOG.md index 29ac5ca8e9578..bb391a4a9f4e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,40 @@ +2.0.1 +============= +* Fixed bugs: + * Fixed an issue to allow deployment of sample data after running "composer create-project" + * Fixed an issue that made it possible for someone to edit someone else's reviews + * Fixed an issue that made it possible to view order details for certain orders that were created by someone else + * Fixed an issue where catalog price rule isn't applied to a product that is created when using Web API + * Fixed an issue where an empty file was uploaded to custom option + * Fixed an issue where minicart does not clears after completing an order via PayPal + * Fixed an issue plugin incorrect calls when proxy exists + * Fixed an issue when travis CI builds fail due to authentication + * Fixed an issue when custom options for configurable products were calculated incorrectly + * Fixed an issue with modifying a category form on store view level + * Fixed an issue where URL rewrites worked incorrectly for sample data + * Fixed an issue with BaseURL in static files + * Fixed an issue where a customer's custom attribute of 'file' type isn't supported by UI Form Component + * Fixed an issue when bin/magento setup:upgrade does not clear cache properly + * Fixed an issue where category creation from product page fails if Google Chrome Experiments are enabled + * Fixed an issue where information about the country selected in address is not presented in checkout flow + * Fixed an issue where customer segments prevent page from caching + * Fixed an issue where an imported product with replace behaviour causes an error for multi-store implementations. + * Fixed an issue with validation of url_key during import + * Fixed an issue with "Learn More" link for Payments Pro goes to Payflow Pro + * Fixed an issue in which a JS error appears if loading a product grid after clearing cache and static files +* GitHub requests: + * [#2519](https://github.com/magento/magento2/issues/2519) -- Fixed an issue where synonyms don't work with Magento 2.0 + * [#2675](https://github.com/magento/magento2/issues/2675) -- Fixed an issue with admin order creation when config "Include Tax In Order Total is set to yes + * [#2471](https://github.com/magento/magento2/issues/2471) -- Fixed an issue with incorrect prices on configurable product page when catalog prices include tax + * [#2674](https://github.com/magento/magento2/issues/2674) -- Fixed an issue where plugins/interceptors don't work with early stage single instance objects + * [#2888](https://github.com/magento/magento2/issues/2888) -- Fixed an issue where not all files are pre-compiled +* Various improvements: + * Fixed performance issue on customer edit form + * Fixed performance issue related to swatch module + * Fixed several security-related issues + * Added support of latest USPS API + * Added support of PHP 7.0.2 + 2.0.0 ============= * Fixed bugs: @@ -108,7 +145,7 @@ * Added the ability of inline and bulk inline editing in data grids * WebApi Framework improvements: * Added the support for store codes in API calls - * Added the ability to update the Magento system to a particular version of Magento + * Added the ability to update the Magento system to a particular version of Magento * Added the ability to enable/disable modules for Magento application * Added the ability to use maintenance mode * Introduced the common interface for Webapi payload processors @@ -146,7 +183,7 @@ * Updated the extensions styles in the Web Installation Wizard * Added the ability to control access to the setup tool * Added the Install Components functionality for Web Installation Wizard - * Updated styles + * Updated styles * Sample Data: * Improved sample data installation UX * Updated sample data with Product Heros, color swatches, MAP and rule based product relations @@ -232,7 +269,7 @@ * [#1418](https://github.com/magento/magento2/issue/1418) -- Items in minicart are not cleared after successful placing an order * [#1408](https://github.com/magento/magento2/issue/1408) -- Error command cli setup:static-content:deploy * [#1396](https://github.com/magento/magento2/issue/1396) -- Products are not shown in category right after import - + 1.0.0-beta ============= * Framework improvements: diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json index 0e5cbbf800e49..e34826d64cb62 100644 --- a/app/code/Magento/AdminNotification/composer.json +++ b/app/code/Magento/AdminNotification/composer.json @@ -10,7 +10,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/AdvancedPricingImportExport/composer.json b/app/code/Magento/AdvancedPricingImportExport/composer.json index aed7e6f5c7f10..ddf71ea6f8cb4 100644 --- a/app/code/Magento/AdvancedPricingImportExport/composer.json +++ b/app/code/Magento/AdvancedPricingImportExport/composer.json @@ -13,7 +13,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Authorization/composer.json b/app/code/Magento/Authorization/composer.json index e605b5f495bc8..cb29083b0a475 100644 --- a/app/code/Magento/Authorization/composer.json +++ b/app/code/Magento/Authorization/composer.json @@ -7,7 +7,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Authorizenet/Test/Unit/Model/DirectpostTest.php b/app/code/Magento/Authorizenet/Test/Unit/Model/DirectpostTest.php index 3726d4e5108ae..925dd324a9e8f 100644 --- a/app/code/Magento/Authorizenet/Test/Unit/Model/DirectpostTest.php +++ b/app/code/Magento/Authorizenet/Test/Unit/Model/DirectpostTest.php @@ -331,7 +331,7 @@ public function testCheckResponseCodeFailure($responseCode) $this->dataHelperMock->expects($this->any()) ->method('wrapGatewayError') ->with($reasonText) - ->willReturn(__('Gateway error: ' . $reasonText)); + ->willReturn(__('Gateway error: %1', $reasonText)); $this->directpost->checkResponseCode(); } diff --git a/app/code/Magento/Authorizenet/composer.json b/app/code/Magento/Authorizenet/composer.json index c03f16a1d6c20..36a16a1785a6d 100644 --- a/app/code/Magento/Authorizenet/composer.json +++ b/app/code/Magento/Authorizenet/composer.json @@ -13,7 +13,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "proprietary" ], diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json index 827922566f41c..202feeb58d9d2 100644 --- a/app/code/Magento/Backend/composer.json +++ b/app/code/Magento/Backend/composer.json @@ -21,7 +21,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Backend/i18n/en_US.csv b/app/code/Magento/Backend/i18n/en_US.csv index 6e16f6a6e7ec6..0c5586948801f 100644 --- a/app/code/Magento/Backend/i18n/en_US.csv +++ b/app/code/Magento/Backend/i18n/en_US.csv @@ -306,7 +306,7 @@ YTD,YTD "Maximum sender name length is 255. Please correct your settings.","Maximum sender name length is 255. Please correct your settings." "The file you're uploading exceeds the server size limit of %1 kilobytes.","The file you're uploading exceeds the server size limit of %1 kilobytes." "The base directory to upload file is not specified.","The base directory to upload file is not specified." -"The specified image adapter cannot be used because of: ","The specified image adapter cannot be used because of: " +"The specified image adapter cannot be used because of: %1","The specified image adapter cannot be used because of: %1" "Default scope","Default scope" "Base currency","Base currency" "Display default currency","Display default currency" diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml index 4997592a10c5b..933220342339b 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml @@ -7,4 +7,7 @@ diff --git a/app/code/Magento/Backup/composer.json b/app/code/Magento/Backup/composer.json index a847ec3d13933..aed884698ec43 100644 --- a/app/code/Magento/Backup/composer.json +++ b/app/code/Magento/Backup/composer.json @@ -9,7 +9,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Braintree/composer.json b/app/code/Magento/Braintree/composer.json index 5b835db6ad5da..ba4d37cacff59 100644 --- a/app/code/Magento/Braintree/composer.json +++ b/app/code/Magento/Braintree/composer.json @@ -22,7 +22,7 @@ "magento/module-checkout-agreements": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "proprietary" ], diff --git a/app/code/Magento/Bundle/Test/Unit/Model/CartItemProcessorTest.php b/app/code/Magento/Bundle/Test/Unit/Model/CartItemProcessorTest.php index 02be067f9e68a..03e1646cca386 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/CartItemProcessorTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/CartItemProcessorTest.php @@ -79,7 +79,16 @@ public function testConvertToBuyRequest() $dataObjectMock = $this->getMock('\Magento\Framework\DataObject'); $optionExtensionMock = $this->getMock( '\Magento\Quote\Api\Data\ProductOptionExtensionInterface', - ['getBundleOptions'], + [ + 'getBundleOptions', + 'getCustomOptions', + 'setCustomOptions', + 'setBundleOptions', + 'getDownloadableOption', + 'setDownloadableOption', + 'getConfigurableItemOptions', + 'setConfigurableItemOptions' + ], [], '', false @@ -128,7 +137,16 @@ public function testProcessProductOptions() $productOptionMock = $this->getMock('\Magento\Quote\Model\Quote\ProductOption', [], [], '', false); $optionExtensionMock = $this->getMock( '\Magento\Quote\Api\Data\ProductOptionExtensionInterface', - ['setBundleOptions'], + [ + 'getBundleOptions', + 'getCustomOptions', + 'setCustomOptions', + 'setBundleOptions', + 'getDownloadableOption', + 'setDownloadableOption', + 'getConfigurableItemOptions', + 'setConfigurableItemOptions' + ], [], '', false diff --git a/app/code/Magento/Bundle/composer.json b/app/code/Magento/Bundle/composer.json index 8fe38feab150b..f8b8428948356 100644 --- a/app/code/Magento/Bundle/composer.json +++ b/app/code/Magento/Bundle/composer.json @@ -24,7 +24,7 @@ "magento/module-bundle-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/BundleImportExport/composer.json b/app/code/Magento/BundleImportExport/composer.json index 209f28b5df827..cdec6a3cf1e4f 100644 --- a/app/code/Magento/BundleImportExport/composer.json +++ b/app/code/Magento/BundleImportExport/composer.json @@ -11,7 +11,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CacheInvalidate/composer.json b/app/code/Magento/CacheInvalidate/composer.json index cd5bb4a4e155b..f76e18c2d6e7e 100644 --- a/app/code/Magento/CacheInvalidate/composer.json +++ b/app/code/Magento/CacheInvalidate/composer.json @@ -7,7 +7,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Captcha/composer.json b/app/code/Magento/Captcha/composer.json index 30dbf2953ae41..2eb1788a140ea 100644 --- a/app/code/Magento/Captcha/composer.json +++ b/app/code/Magento/Captcha/composer.json @@ -10,7 +10,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php index 06a77c8af6023..f73dda6152d1f 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php @@ -11,7 +11,7 @@ */ namespace Magento\Catalog\Block\Adminhtml\Category\Tab; -class Attributes extends \Magento\Backend\Block\Widget\Form\Generic +class Attributes extends \Magento\Catalog\Block\Adminhtml\Form { /** * Retrieve Category object diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/File/Validator.php b/app/code/Magento/Catalog/Model/Product/Option/Type/File/Validator.php index f0e4ef3ef504b..a22a32c6fad6e 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/File/Validator.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File/Validator.php @@ -100,6 +100,17 @@ protected function getValidatorErrors($errors, $fileInfo, $option) $this->fileSize->getMaxFileSizeInMb() ); break; + case \Zend_Validate_File_ImageSize::NOT_DETECTED: + $result[] = __( + "The file '%1' is empty. Please choose another one", + $fileInfo['title'] + ); + break; + default: + $result[] = __( + "The file '%1' is invalid. Please choose another one", + $fileInfo['title'] + ); } } return $result; diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFile.php b/app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFile.php index 1b3b2c5f0d8f3..118c82f9f8665 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFile.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFile.php @@ -57,22 +57,30 @@ class ValidatorFile extends Validator */ protected $product; + /** + * @var \Magento\Framework\Validator\File\IsImage + */ + protected $isImageValidator; + /** * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Filesystem $filesystem * @param \Magento\Framework\File\Size $fileSize * @param \Magento\Framework\HTTP\Adapter\FileTransferFactory $httpFactory + * @param \Magento\Framework\Validator\File\IsImage $isImageValidator * @throws \Magento\Framework\Exception\FileSystemException */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\File\Size $fileSize, - \Magento\Framework\HTTP\Adapter\FileTransferFactory $httpFactory + \Magento\Framework\HTTP\Adapter\FileTransferFactory $httpFactory, + \Magento\Framework\Validator\File\IsImage $isImageValidator ) { $this->mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA); $this->filesystem = $filesystem; $this->httpFactory = $httpFactory; + $this->isImageValidator = $isImageValidator; parent::__construct($scopeConfig, $filesystem, $fileSize); } @@ -169,8 +177,15 @@ public function validate($processingParams, $option) $_height = 0; if ($tmpDirectory->isReadable($tmpDirectory->getRelativePath($fileInfo['tmp_name']))) { - $imageSize = getimagesize($fileInfo['tmp_name']); - if ($imageSize) { + if (filesize($fileInfo['tmp_name'])) { + if ($this->isImageValidator->isValid($fileInfo['tmp_name'])) { + $imageSize = getimagesize($fileInfo['tmp_name']); + } + } else { + throw new LocalizedException(__('The file is empty. Please choose another one')); + } + + if (!empty($imageSize)) { $_width = $imageSize[0]; $_height = $imageSize[1]; } diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json index c403388e3e4ab..4a74eb2704e9a 100644 --- a/app/code/Magento/Catalog/composer.json +++ b/app/code/Magento/Catalog/composer.json @@ -34,7 +34,7 @@ "magento/module-catalog-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Catalog/i18n/en_US.csv b/app/code/Magento/Catalog/i18n/en_US.csv index 12c16c5b7234c..8580eb33942b2 100644 --- a/app/code/Magento/Catalog/i18n/en_US.csv +++ b/app/code/Magento/Catalog/i18n/en_US.csv @@ -699,3 +699,4 @@ Autosettings,Autosettings "Allow Gift Message","Allow Gift Message" "Meta Title","Meta Title" "Maximum 255 chars","Maximum 255 chars" +"The file is empty. Please choose another one","The file is empty. Please choose another one" diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml index 644226409aa72..861a4e9a0424a 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml @@ -68,7 +68,7 @@ require(['prototype'], function(){
- getTitle(); ?> + escapeHtml($_fileInfo->getTitle()); ?>   @@ -79,7 +79,7 @@ require(['prototype'], function(){
> - /> + /> getFileExtension()): ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/new-category-dialog.js b/app/code/Magento/Catalog/view/adminhtml/web/js/new-category-dialog.js index 44f3371cf9371..7bc01bfccb8ea 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/js/new-category-dialog.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/js/new-category-dialog.js @@ -83,20 +83,42 @@ define([ var thisButton = $(e.currentTarget); thisButton.prop('disabled', true); + + var postData = { + general: { + name: $('#new_category_name').val(), + is_active: 1, + include_in_menu: 1 + }, + parent: $('#new_category_parent').val(), + use_config: ['available_sort_by', 'default_sort_by'], + form_key: FORM_KEY, + return_session_messages_only: 1 + }; + + var fields = {}; + + $.each($(newCategoryForm).serializeArray(), function(_, field) { + if ( + field.name && + field.name != 'new_category_name' && + field.name != 'new_category_parent' + ) { + if (fields.hasOwnProperty(field.name)) { + fields[field.name] = $.makeArray(fields[field.name]); + fields[field.name].push(field.value); + } + else { + fields[field.name] = field.value; + } + } + }); + $.extend(postData, fields); + $.ajax({ type: 'POST', url: widget.options.saveCategoryUrl, - data: { - general: { - name: $('#new_category_name').val(), - is_active: 1, - include_in_menu: 1 - }, - parent: $('#new_category_parent').val(), - use_config: ['available_sort_by', 'default_sort_by'], - form_key: FORM_KEY, - return_session_messages_only: 1 - }, + data: postData, dataType: 'json', context: $('body') }).success(function (data) { diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml index a7c60b9f3a920..7ced840c1060a 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml @@ -17,14 +17,14 @@ getIsRequire()) ? ' required' : ''; ?>
-