From fd66204c60e27625a98453399c74c47235bea710 Mon Sep 17 00:00:00 2001 From: Vova Yatsyuk Date: Mon, 9 Oct 2017 12:11:19 +0300 Subject: [PATCH 1/4] Fixed ability to set field config from layout xml Example: ``` Another Label Field Placeholder ... ``` --- .../Block/Checkout/AttributeMerger.php | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php index 4ee3d070d5b77..0230923967d90 100644 --- a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php +++ b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php @@ -168,20 +168,18 @@ protected function getFieldConfig( $element = [ 'component' => isset($additionalConfig['component']) ? $additionalConfig['component'] : $uiComponent, - 'config' => [ - // customScope is used to group elements within a single form (e.g. they can be validated separately) - 'customScope' => $dataScopePrefix, - 'customEntry' => isset($additionalConfig['config']['customEntry']) - ? $additionalConfig['config']['customEntry'] - : null, - 'template' => 'ui/form/field', - 'elementTmpl' => isset($additionalConfig['config']['elementTmpl']) - ? $additionalConfig['config']['elementTmpl'] - : $elementTemplate, - 'tooltip' => isset($additionalConfig['config']['tooltip']) - ? $additionalConfig['config']['tooltip'] - : null - ], + 'config' => $this->mergeConfigurationNode( + 'config', + $additionalConfig, + [ + 'config' => [ + // customScope is used to group elements within a single form (e.g. they can be validated separately) + 'customScope' => $dataScopePrefix, + 'template' => 'ui/form/field', + 'elementTmpl' => $elementTemplate, + ], + ] + ), 'dataScope' => $dataScopePrefix . '.' . $attributeCode, 'label' => $attributeConfig['label'], 'provider' => $providerName, From 626971835414dc4915603f064d00c6967c29dbf8 Mon Sep 17 00:00:00 2001 From: Vova Yatsyuk Date: Mon, 9 Oct 2017 14:57:21 +0300 Subject: [PATCH 2/4] Fixed LiveCodeTest failure: Line exceeds maximum limit of 120 characters --- app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php index 0230923967d90..d93475a4744ca 100644 --- a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php +++ b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php @@ -173,7 +173,8 @@ protected function getFieldConfig( $additionalConfig, [ 'config' => [ - // customScope is used to group elements within a single form (e.g. they can be validated separately) + // customScope is used to group elements within a single + // form (e.g. they can be validated separately) 'customScope' => $dataScopePrefix, 'template' => 'ui/form/field', 'elementTmpl' => $elementTemplate, From bac95762553a252c7f110a6b581b8b00c1ffcafd Mon Sep 17 00:00:00 2001 From: Lorenzo Stramaccia Date: Wed, 11 Oct 2017 14:13:38 +0200 Subject: [PATCH 3/4] Fix issue 10501 --- lib/web/mage/utils/template.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/web/mage/utils/template.js b/lib/web/mage/utils/template.js index 619f93229f61a..e29908b7c4e9c 100644 --- a/lib/web/mage/utils/template.js +++ b/lib/web/mage/utils/template.js @@ -76,7 +76,11 @@ define([ * @returns {Boolean} */ function isTemplate(value) { - return typeof value === 'string' && ~value.indexOf(opener); + return typeof value === 'string' && + value.indexOf(opener) !== -1 && + // the below pattern almost always indicates an accident which should not cause template evaluation + // refuse to evaluate + value.indexOf('${{') === -1; } /** From 30752679e1590895860d2f8fb3fe0118ee60f176 Mon Sep 17 00:00:00 2001 From: Marc Rodriguez Date: Sun, 15 Oct 2017 17:07:31 +0200 Subject: [PATCH 4/4] FR#10231_20 Custom URL Rewrite Not working --- app/code/Magento/Store/etc/frontend/di.xml | 2 +- app/code/Magento/UrlRewrite/etc/frontend/di.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Store/etc/frontend/di.xml b/app/code/Magento/Store/etc/frontend/di.xml index fd42a0367aa93..c39d5df863939 100644 --- a/app/code/Magento/Store/etc/frontend/di.xml +++ b/app/code/Magento/Store/etc/frontend/di.xml @@ -18,7 +18,7 @@ Magento\Framework\App\Router\Base false - 20 + 30 Magento\Framework\App\Router\DefaultRouter diff --git a/app/code/Magento/UrlRewrite/etc/frontend/di.xml b/app/code/Magento/UrlRewrite/etc/frontend/di.xml index ff44acb434366..d46bb1c5d14a2 100644 --- a/app/code/Magento/UrlRewrite/etc/frontend/di.xml +++ b/app/code/Magento/UrlRewrite/etc/frontend/di.xml @@ -12,7 +12,7 @@ Magento\UrlRewrite\Controller\Router false - 40 + 20