Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.2-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - magento#21652: [Backport] Fix issue with custom option file uploading (by @amol2jcommerce)
 - magento#21598: Back port pull 20617 (by @lisovyievhenii)
 - magento#21569: [Backport] Checkout Page Cancel button is not working magento#21327 (by @mage2pratik)
 - magento#21568: [Backport] Fixed magento#21425 Date design change show not correctly value in backend (by @mage2pratik)


Fixed GitHub Issues:
 - magento#14882: product_types.xml doesn't allow numbers in modelInstance (reported by @domeglic) has been fixed in magento#21598 by @lisovyievhenii in 2.2-develop branch
   Related commits:
     1. 9688409
     2. 6bc7575
     3. 1c45357
     4. ab8d312

 - magento#21327: Checkout Page Cancel button is not working (reported by @speedy008) has been fixed in magento#21569 by @mage2pratik in 2.2-develop branch
   Related commits:
     1. b169fe3
     2. b2d04ca
     3. b4af131

 - magento#21425: Date design change show not correctly value in backend (reported by @mrtuvn) has been fixed in magento#21568 by @mage2pratik in 2.2-develop branch
   Related commits:
     1. 080743f
     2. 2b41017
     3. 21cd1cb
  • Loading branch information
magento-engcom-team authored Mar 11, 2019
2 parents 114bcec + 581861b commit a089cfe
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

namespace Magento\Backend\Block\System\Design\Edit\Tab;

/**
* General system tab block.
*/
class General extends \Magento\Backend\Block\Widget\Form\Generic
{
/**
Expand Down Expand Up @@ -90,7 +93,7 @@ protected function _prepareForm()
]
);

$dateFormat = $this->_localeDate->getDateFormat(\IntlDateFormatter::SHORT);
$dateFormat = $this->_localeDate->getDateFormatWithLongYear();
$fieldset->addField(
'date_from',
'date',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
],
],
'renderer_attribute_with_invalid_value' => [
'<?xml version="1.0"?><config><option name="name_one" renderer="true12"><inputType name="name_one"/>' .
'<?xml version="1.0"?><config><option name="name_one" renderer="123true"><inputType name="name_one"/>' .
'</option></config>',
[
"Element 'option', attribute 'renderer': [facet 'pattern'] The value 'true12' is not accepted by the " .
"pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
"Element 'option', attribute 'renderer': 'true12' is not a valid value of the atomic" .
"Element 'option', attribute 'renderer': [facet 'pattern'] The value '123true' is not accepted by the " .
"pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'option', attribute 'renderer': '123true' is not a valid value of the atomic" .
" type 'modelName'.\nLine: 1\n"
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
'<?xml version="1.0"?><config><type name="some_name" modelInstance="123" /></config>',
[
"Element 'type', attribute 'modelInstance': [facet 'pattern'] The value '123' is not accepted by the" .
" pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
" pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'type', attribute 'modelInstance': '123' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand Down Expand Up @@ -57,7 +57,7 @@
'<?xml version="1.0"?><config><type name="some_name"><priceModel instance="123123" /></type></config>',
[
"Element 'priceModel', attribute 'instance': [facet 'pattern'] The value '123123' is not accepted " .
"by the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
"by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'priceModel', attribute 'instance': '123123' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand All @@ -66,7 +66,7 @@
'<?xml version="1.0"?><config><type name="some_name"><indexerModel instance="123" /></type></config>',
[
"Element 'indexerModel', attribute 'instance': [facet 'pattern'] The value '123' is not accepted by " .
"the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
"the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'indexerModel', attribute 'instance': '123' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand All @@ -83,7 +83,7 @@
'<?xml version="1.0"?><config><type name="some_name"><stockIndexerModel instance="1234"/></type></config>',
[
"Element 'stockIndexerModel', attribute 'instance': [facet 'pattern'] The value '1234' is not " .
"accepted by the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'stockIndexerModel', attribute 'instance': '1234' is not a valid value of the atomic " .
"type 'modelName'.\nLine: 1\n"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
<stockIndexerModel instance="instance_name"/>
</type>
<type label="some_label" name="some_name2" modelInstance="model_name">
<allowedSelectionTypes>
<type name="some_name" />
</allowedSelectionTypes>
<priceModel instance="instance_name_with_digits_123" />
<indexerModel instance="instance_name_with_digits_123" />
<stockIndexerModel instance="instance_name_with_digits_123"/>
</type>
<type label="some_label" name="some_name3" modelInstance="model_name">
<allowedSelectionTypes>
<type name="some_name" />
</allowedSelectionTypes>
Expand All @@ -25,5 +33,6 @@
<composableTypes>
<type name="some_name"/>
<type name="some_name2"/>
<type name="some_name3"/>
</composableTypes>
</config>
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/etc/product_options.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
<xs:simpleType name="modelName">
<xs:annotation>
<xs:documentation>
Model name can contain only [a-zA-Z_\\].
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z_\\]+" />
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/etc/product_types_base.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@
<xs:simpleType name="modelName">
<xs:annotation>
<xs:documentation>
Model name can contain only [a-zA-Z_\\].
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z_\\]+" />
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,13 @@ function (
}
},

/**
* Manage cancel button visibility
*/
canUseCancelBillingAddress: ko.computed(function () {
return quote.billingAddress() || lastSelectedBillingAddress;
}),

/**
* Restore billing address
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<button class="action action-update" type="button" data-bind="click: updateAddress">
<span data-bind="i18n: 'Update'"></span>
</button>
<button class="action action-cancel" type="button" data-bind="click: cancelAddressEdit">
<button class="action action-cancel" type="button" data-bind="click: cancelAddressEdit, visible: canUseCancelBillingAddress()">
<span data-bind="i18n: 'Cancel'"></span>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
'attributes_with_type_modelName_and_invalid_value' => [
'<?xml version="1.0"?><config><entity name="Name/one" model="model_one" '
. 'entityAttributeFilterType="model_one"/><entityType entity="Name/one" name="name_one" model="1"/>'
. ' <fileFormat name="name_one" model="model1"/></config>',
. ' <fileFormat name="name_one" model="1model"/></config>',
[
"Element 'entityType', attribute 'model': [facet 'pattern'] The value '1' is not accepted by the " .
"pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entityType', attribute 'model': '1' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n",
"Element 'fileFormat', attribute 'model': [facet 'pattern'] The value 'model1' is not " .
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"Element 'fileFormat', attribute 'model': 'model1' is not a valid " .
"Element 'fileFormat', attribute 'model': [facet 'pattern'] The value '1model' is not " .
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'fileFormat', attribute 'model': '1model' is not a valid " .
"value of the atomic type 'modelName'.\nLine: 1\n"
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
["Element 'entity', attribute 'notallowed': The attribute 'notallowed' is not allowed.\nLine: 1\n"],
],
'entity_model_with_invalid_value' => [
'<?xml version="1.0"?><config><entity name="test_name" label="test_label" model="afwer34" ' .
'<?xml version="1.0"?><config><entity name="test_name" label="test_label" model="34afwer" ' .
'behaviorModel="test" /></config>',
[
"Element 'entity', attribute 'model': [facet 'pattern'] The value 'afwer34' is not " .
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"Element 'entity', attribute 'model': 'afwer34' is not a valid value of the atomic type" .
"Element 'entity', attribute 'model': [facet 'pattern'] The value '34afwer' is not " .
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entity', attribute 'model': '34afwer' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
],
Expand All @@ -40,7 +40,7 @@
'</config>',
[
"Element 'entity', attribute 'behaviorModel': [facet 'pattern'] The value '666' is not accepted by " .
"the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entity', attribute 'behaviorModel': '666' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'<?xml version="1.0"?><config><entity name="some_name" model="12345"/></config>',
[
"Element 'entity', attribute 'model': [facet 'pattern'] The value '12345' is not accepted by " .
"the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entity', attribute 'model': '12345' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand All @@ -28,7 +28,7 @@
'<?xml version="1.0"?><config><entity name="some_name" behaviorModel="=--09"/></config>',
[
"Element 'entity', attribute 'behaviorModel': [facet 'pattern'] The value '=--09' is not " .
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entity', attribute 'behaviorModel': '=--09' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand All @@ -46,11 +46,11 @@
["Element 'entityType': The attribute 'model' is required but missing.\nLine: 1\n"],
],
'entitytype_with_invalid_model_attribute_value' => [
'<?xml version="1.0"?><config><entityType entity="entity_name" name="some_name" model="test1"/></config>',
'<?xml version="1.0"?><config><entityType entity="entity_name" name="some_name" model="1test"/></config>',
[
"Element 'entityType', attribute 'model': [facet 'pattern'] The value 'test1' is not " .
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"Element 'entityType', attribute 'model': 'test1' is not a valid value of the atomic type" .
"Element 'entityType', attribute 'model': [facet 'pattern'] The value '1test' is not " .
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entityType', attribute 'model': '1test' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
],
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/ImportExport/etc/export.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@
<xs:simpleType name="modelName">
<xs:annotation>
<xs:documentation>
Model name can contain only [A-Za-z_\\].
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z_\\]+" />
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
4 changes: 2 additions & 2 deletions app/code/Magento/ImportExport/etc/import.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
<xs:simpleType name="modelName">
<xs:annotation>
<xs:documentation>
Model name can contain only [A-Za-z_\\].
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z_\\]+" />
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
4 changes: 3 additions & 1 deletion lib/internal/Magento/Framework/Filesystem/DirectoryList.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Framework\Filesystem;

/**
Expand Down Expand Up @@ -96,7 +97,8 @@ public function __construct($root, array $config = [])
static::validate($config);
$this->root = $this->normalizePath($root);
$this->directories = static::getDefaultConfig();
$this->directories[self::SYS_TMP] = [self::PATH => realpath(sys_get_temp_dir())];
$sysTmpPath = get_cfg_var('upload_tmp_dir') ?: sys_get_temp_dir();
$this->directories[self::SYS_TMP] = [self::PATH => realpath($sysTmpPath)];

// inject custom values from constructor
foreach ($this->directories as $code => $dir) {
Expand Down

0 comments on commit a089cfe

Please sign in to comment.