From 6ce82420bc4f0ee247c4a865baec8f934bcd922f Mon Sep 17 00:00:00 2001 From: Tom Klingenberg Date: Wed, 29 Mar 2017 11:32:11 +0200 Subject: [PATCH 1/6] Remove superfluous character in class The solidusbackslash character ("\") was put more than once in the same regex character class across some XSD files. Per each character class there is no need to specify it twice. I ran over this while looking into an issue with class-name validation which do not allow digits within class names. Refs: - https://www.w3.org/TR/xmlschema11-2/#cces - #4470 - #5420 - #8307 --- .../_files/invalidProductOptionsXmlArray.php | 2 +- .../Config/_files/invalidProductTypesXmlArray.php | 8 ++++---- app/code/Magento/Catalog/etc/product_options.xsd | 4 ++-- .../Magento/Catalog/etc/product_types_base.xsd | 4 ++-- .../Model/Config/_files/invalidSystemXmlArray.php | 4 ++-- app/code/Magento/Config/etc/system.xsd | 14 +++++++------- app/code/Magento/Config/etc/system_file.xsd | 2 +- .../Export/Config/_files/invalidExportXmlArray.php | 4 ++-- .../Config/_files/invalidImportMergedXmlArray.php | 4 ++-- .../Import/Config/_files/invalidImportXmlArray.php | 6 +++--- app/code/Magento/ImportExport/etc/export.xsd | 4 ++-- app/code/Magento/ImportExport/etc/import.xsd | 4 ++-- 12 files changed, 30 insertions(+), 30 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php index d5dcb3cd01054..aea8166c0ae0e 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php @@ -33,7 +33,7 @@ '', [ "Element 'option', attribute 'renderer': [facet 'pattern'] The value 'true12' is not accepted by the " . - "pattern '[a-zA-Z_\\\\\\\\]+'.\nLine: 1\n", + "pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n", "Element 'option', attribute 'renderer': 'true12' is not a valid value of the atomic" . " type 'modelName'.\nLine: 1\n" ], diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/_files/invalidProductTypesXmlArray.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/_files/invalidProductTypesXmlArray.php index dbc40e1ac5f24..3da56e9a1481b 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/_files/invalidProductTypesXmlArray.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/_files/invalidProductTypesXmlArray.php @@ -23,7 +23,7 @@ '', [ "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_\\\\]+'.\nLine: 1\n", "Element 'type', attribute 'modelInstance': '123' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -57,7 +57,7 @@ '', [ "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_\\\\]+'.\nLine: 1\n", "Element 'priceModel', attribute 'instance': '123123' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -66,7 +66,7 @@ '', [ "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_\\\\]+'.\nLine: 1\n", "Element 'indexerModel', attribute 'instance': '123' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -83,7 +83,7 @@ '', [ "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_\\\\]+'.\nLine: 1\n", "Element 'stockIndexerModel', attribute 'instance': '1234' is not a valid value of the atomic " . "type 'modelName'.\nLine: 1\n" ], diff --git a/app/code/Magento/Catalog/etc/product_options.xsd b/app/code/Magento/Catalog/etc/product_options.xsd index 18b5934c1410f..2076309e5eb25 100644 --- a/app/code/Magento/Catalog/etc/product_options.xsd +++ b/app/code/Magento/Catalog/etc/product_options.xsd @@ -61,11 +61,11 @@ - Model name can contain only [a-zA-Z_\\\\]. + Model name can contain only [a-zA-Z_\\]. - + diff --git a/app/code/Magento/Catalog/etc/product_types_base.xsd b/app/code/Magento/Catalog/etc/product_types_base.xsd index eddd7a6845488..955b08b94c3b2 100644 --- a/app/code/Magento/Catalog/etc/product_types_base.xsd +++ b/app/code/Magento/Catalog/etc/product_types_base.xsd @@ -92,11 +92,11 @@ - Model name can contain only [a-zA-Z_\\\\]. + Model name can contain only [a-zA-Z_\\]. - + diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/_files/invalidSystemXmlArray.php b/app/code/Magento/Config/Test/Unit/Model/Config/_files/invalidSystemXmlArray.php index 5dbc216da9d06..418b809e3188d 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/_files/invalidSystemXmlArray.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/_files/invalidSystemXmlArray.php @@ -63,7 +63,7 @@ "Element 'config_path': [facet 'minLength'] The value has a length of '2'; this underruns " . "the allowed minimum length of '5'.\nLine: 1\n", "Element 'config_path': [facet 'pattern'] The value 'co' is not " . - "accepted by the pattern '[a-zA-Z0-9_\\\\\\\\]+/[a-zA-Z0-9_\\\\\\\\]+/[a-zA-Z0-9_\\\\\\\\]+'.\nLine: 1\n", + "accepted by the pattern '[a-zA-Z0-9_\\\\]+/[a-zA-Z0-9_\\\\]+/[a-zA-Z0-9_\\\\]+'.\nLine: 1\n", "Element 'config_path': 'co' is " . "not a valid value of the atomic type 'typeConfigPath'.\nLine: 1\n" ], ], @@ -76,7 +76,7 @@ "Element 'if_module_enabled': [facet 'minLength'] The value has a length of '3'; this underruns the " . "allowed minimum length of '5'.\nLine: 1\n", "Element 'if_module_enabled': [facet 'pattern'] The value 'Som' is not " . - "accepted by the pattern '[A-Z]+[a-zA-Z0-9]{1,}[_\\\\\\\\][A-Z]+[A-Z0-9a-z]{1,}'.\nLine: 1\n", + "accepted by the pattern '[A-Z]+[a-zA-Z0-9]{1,}[_\\\\][A-Z]+[A-Z0-9a-z]{1,}'.\nLine: 1\n", "Element 'if_module_enabled': 'Som' " . "is not a valid value of the atomic type 'typeModule'.\nLine: 1\n" ], ], diff --git a/app/code/Magento/Config/etc/system.xsd b/app/code/Magento/Config/etc/system.xsd index 8579d14a9cf31..e6af09904df50 100644 --- a/app/code/Magento/Config/etc/system.xsd +++ b/app/code/Magento/Config/etc/system.xsd @@ -317,7 +317,7 @@ - + @@ -395,7 +395,7 @@ - + @@ -408,7 +408,7 @@ - + @@ -433,7 +433,7 @@ - + @@ -445,7 +445,7 @@ - + @@ -473,14 +473,14 @@ - + - + diff --git a/app/code/Magento/Config/etc/system_file.xsd b/app/code/Magento/Config/etc/system_file.xsd index 0914312c76362..d89fd93b61327 100644 --- a/app/code/Magento/Config/etc/system_file.xsd +++ b/app/code/Magento/Config/etc/system_file.xsd @@ -474,7 +474,7 @@ - + diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php b/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php index 22539bdee423b..f6687ed9b1fd1 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php @@ -25,11 +25,11 @@ . ' ', [ "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_\\\\]+'.\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", + "accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n", "Element 'fileFormat', attribute 'model': 'model1' is not a valid " . "value of the atomic type 'modelName'.\nLine: 1\n" ], diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php index 35c8a8e854712..c17d686ffbd98 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php @@ -30,7 +30,7 @@ 'behaviorModel="test" />', [ "Element 'entity', attribute 'model': [facet 'pattern'] The value 'afwer34' is not " . - "accepted by the pattern '[A-Za-z_\\\\\\\\]+'.\nLine: 1\n", + "accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n", "Element 'entity', attribute 'model': 'afwer34' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -40,7 +40,7 @@ '', [ "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_\\\\]+'.\nLine: 1\n", "Element 'entity', attribute 'behaviorModel': '666' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php index 550bab0fbea01..4b17a5aed3444 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php @@ -19,7 +19,7 @@ '', [ "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_\\\\]+'.\nLine: 1\n", "Element 'entity', attribute 'model': '12345' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -28,7 +28,7 @@ '', [ "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_\\\\]+'.\nLine: 1\n", "Element 'entity', attribute 'behaviorModel': '=--09' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -49,7 +49,7 @@ '', [ "Element 'entityType', attribute 'model': [facet 'pattern'] The value 'test1' is not " . - "accepted by the pattern '[A-Za-z_\\\\\\\\]+'.\nLine: 1\n", + "accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n", "Element 'entityType', attribute 'model': 'test1' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], diff --git a/app/code/Magento/ImportExport/etc/export.xsd b/app/code/Magento/ImportExport/etc/export.xsd index e6d69809d55b9..bd2a12fe71724 100644 --- a/app/code/Magento/ImportExport/etc/export.xsd +++ b/app/code/Magento/ImportExport/etc/export.xsd @@ -71,11 +71,11 @@ - Model name can contain only [A-Za-z_\\\\]. + Model name can contain only [A-Za-z_\\]. - + diff --git a/app/code/Magento/ImportExport/etc/import.xsd b/app/code/Magento/ImportExport/etc/import.xsd index 4aac9792ce741..04c89248add46 100644 --- a/app/code/Magento/ImportExport/etc/import.xsd +++ b/app/code/Magento/ImportExport/etc/import.xsd @@ -61,11 +61,11 @@ - Model name can contain only [A-Za-z_\\\\]. + Model name can contain only [A-Za-z_\\]. - + From d49012689ae8f0d1713ddbab33a6f4631689ccb8 Mon Sep 17 00:00:00 2001 From: Andreas Wickberg Date: Thu, 30 Mar 2017 11:51:39 +0200 Subject: [PATCH 2/6] Empty resolvedScopeCodes when config cache is cleaned --- lib/internal/Magento/Framework/App/Config.php | 2 ++ .../Magento/Framework/App/Config/ScopeCodeResolver.php | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/lib/internal/Magento/Framework/App/Config.php b/lib/internal/Magento/Framework/App/Config.php index 01db8483142ba..9e64effe54b0f 100644 --- a/lib/internal/Magento/Framework/App/Config.php +++ b/lib/internal/Magento/Framework/App/Config.php @@ -95,6 +95,7 @@ public function isSetFlag($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAU /** * Invalidate cache by type + * Clean scopeCodeResolver * * @return void */ @@ -103,6 +104,7 @@ public function clean() foreach ($this->types as $type) { $type->clean(); } + $this->scopeCodeResolver->clean(); } /** diff --git a/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php b/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php index 4596f317eb18d..95608b37bb4dd 100644 --- a/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php +++ b/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php @@ -58,4 +58,14 @@ public function resolve($scopeType, $scopeCode) $this->resolvedScopeCodes[$scopeType][$scopeCode] = $resolverScopeCode; return $resolverScopeCode; } + + /** + * Clean resolvedScopeCodes, store codes may have been renamed + * + * @return void + */ + public function clean() + { + $this->resolvedScopeCodes = []; + } } From 2d3a524365e0d638e45faa942ccde5f5f545a410 Mon Sep 17 00:00:00 2001 From: Mr Khoa Date: Sun, 2 Apr 2017 08:07:07 +0700 Subject: [PATCH 3/6] Added translation to label argument xml. --- .../Downloadable/view/frontend/layout/customer_account.xml | 2 +- .../Magento/Review/view/frontend/layout/customer_account.xml | 2 +- app/code/Magento/Rss/view/frontend/layout/default.xml | 2 +- app/code/Magento/Shipping/i18n/en_US.csv | 1 + .../Shipping/view/frontend/layout/sales_guest_shipment.xml | 2 +- .../Shipping/view/frontend/layout/sales_order_shipment.xml | 2 +- .../Magento/Wishlist/view/frontend/layout/customer_account.xml | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Downloadable/view/frontend/layout/customer_account.xml b/app/code/Magento/Downloadable/view/frontend/layout/customer_account.xml index 2dec0b76fea61..97b8f2aa7bbf9 100644 --- a/app/code/Magento/Downloadable/view/frontend/layout/customer_account.xml +++ b/app/code/Magento/Downloadable/view/frontend/layout/customer_account.xml @@ -11,7 +11,7 @@ downloadable/customer/products - My Downloadable Products + My Downloadable Products 220 diff --git a/app/code/Magento/Review/view/frontend/layout/customer_account.xml b/app/code/Magento/Review/view/frontend/layout/customer_account.xml index 518957166a2fc..958854c861ba1 100644 --- a/app/code/Magento/Review/view/frontend/layout/customer_account.xml +++ b/app/code/Magento/Review/view/frontend/layout/customer_account.xml @@ -11,7 +11,7 @@ review/customer - My Product Reviews + My Product Reviews 50 diff --git a/app/code/Magento/Rss/view/frontend/layout/default.xml b/app/code/Magento/Rss/view/frontend/layout/default.xml index bc65454ecd6f6..dcebbfee45d34 100644 --- a/app/code/Magento/Rss/view/frontend/layout/default.xml +++ b/app/code/Magento/Rss/view/frontend/layout/default.xml @@ -10,7 +10,7 @@ - RSS + RSS rss diff --git a/app/code/Magento/Shipping/i18n/en_US.csv b/app/code/Magento/Shipping/i18n/en_US.csv index b1eaa148177e8..a919008ee3707 100644 --- a/app/code/Magento/Shipping/i18n/en_US.csv +++ b/app/code/Magento/Shipping/i18n/en_US.csv @@ -180,3 +180,4 @@ City,City "Shipping Policy","Shipping Policy" "Shipping Methods","Shipping Methods" "Track your order","Track your order" +"Track All Shipments","Track All Shipments" diff --git a/app/code/Magento/Shipping/view/frontend/layout/sales_guest_shipment.xml b/app/code/Magento/Shipping/view/frontend/layout/sales_guest_shipment.xml index 9afcbe0419642..deefabc219ab2 100644 --- a/app/code/Magento/Shipping/view/frontend/layout/sales_guest_shipment.xml +++ b/app/code/Magento/Shipping/view/frontend/layout/sales_guest_shipment.xml @@ -14,7 +14,7 @@ - Track All Shipments + Track All Shipments diff --git a/app/code/Magento/Shipping/view/frontend/layout/sales_order_shipment.xml b/app/code/Magento/Shipping/view/frontend/layout/sales_order_shipment.xml index f2f465e091779..f8b369c9d36fd 100644 --- a/app/code/Magento/Shipping/view/frontend/layout/sales_order_shipment.xml +++ b/app/code/Magento/Shipping/view/frontend/layout/sales_order_shipment.xml @@ -14,7 +14,7 @@ - Track All Shipments + Track All Shipments diff --git a/app/code/Magento/Wishlist/view/frontend/layout/customer_account.xml b/app/code/Magento/Wishlist/view/frontend/layout/customer_account.xml index cd87b9c6cb6a1..cff964f605ce6 100644 --- a/app/code/Magento/Wishlist/view/frontend/layout/customer_account.xml +++ b/app/code/Magento/Wishlist/view/frontend/layout/customer_account.xml @@ -11,7 +11,7 @@ wishlist - My Wish List + My Wish List 210 From 17550c836b210db4eb2b501d4126ab2c8ec5e2fe Mon Sep 17 00:00:00 2001 From: Giacomo Mirabassi Date: Mon, 3 Apr 2017 11:26:35 +0200 Subject: [PATCH 4/6] Cron expression */1 makes no sense --- app/code/Magento/Sales/etc/crontab.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Sales/etc/crontab.xml b/app/code/Magento/Sales/etc/crontab.xml index d0d0e0ac3a391..1bb7f26ccc6a5 100644 --- a/app/code/Magento/Sales/etc/crontab.xml +++ b/app/code/Magento/Sales/etc/crontab.xml @@ -28,28 +28,28 @@ 0 0 * * * - */1 * * * * + * * * * * */1 * * * * - */1 * * * * + * * * * * - */1 * * * * + * * * * * - */1 * * * * + * * * * * - */1 * * * * + * * * * * - */1 * * * * + * * * * * - */1 * * * * + * * * * * From 28bfada5e7c176388939eec34e51ccf1491755b5 Mon Sep 17 00:00:00 2001 From: Giacomo Mirabassi Date: Thu, 6 Apr 2017 16:26:08 +0200 Subject: [PATCH 5/6] Fix skipped *\1 --- app/code/Magento/Sales/etc/crontab.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/etc/crontab.xml b/app/code/Magento/Sales/etc/crontab.xml index 1bb7f26ccc6a5..977b87b68c3be 100644 --- a/app/code/Magento/Sales/etc/crontab.xml +++ b/app/code/Magento/Sales/etc/crontab.xml @@ -31,7 +31,7 @@ * * * * * - */1 * * * * + * * * * * * * * * * From cee839d8b8fd7d3bd89b41b2f1ba36010e5ee816 Mon Sep 17 00:00:00 2001 From: Darren Felton Date: Fri, 7 Apr 2017 14:05:24 -0500 Subject: [PATCH 6/6] Corrected class name in documentation. --- app/code/Magento/Quote/Model/Quote.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index ac9324eeedf45..06ac74e8cf346 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -329,7 +329,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C protected $totalsCollector; /** - * @var \\Magento\Quote\Model\Quote\TotalsReader + * @var \Magento\Quote\Model\Quote\TotalsReader */ protected $totalsReader;