-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: ImportExportFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Description
When I use the Magento default csv product import with an url_key
field the value is not formatted/translit before being inserted into the database. This way I end up with spaces in the url key field. The rest of the system works ok with this except GraphQL which will output the url_key
field directly from the database.
Preconditions (*)
Magento 2.4.2 and probably all versions below.
Steps to reproduce (*)
- Create a product with sku: ABC
- Import csv below:
"sku", "url_key"
"ABC", "Test ABC 1 2 3"
Expected result (*)
url_key
attribute being:test-abc-1-2-3
Actual result (*)
url_key
attribute being:test abc 1 2 3
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
Patch
--- vendor/magento/module-catalog-import-export/Model/Import/Product.php
+++ vendor/magento/module-catalog-import-export/Model/Import/Product.php
@@ -3011,7 +3011,7 @@
{
if (!empty($rowData[self::URL_KEY])) {
$urlKey = (string) $rowData[self::URL_KEY];
- return trim(strtolower($urlKey));
+ return $this->productUrl->formatUrlKey($urlKey);
}
if (!empty($rowData[self::COL_NAME])
Metadata
Metadata
Assignees
Labels
Component: ImportExportFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Type
Projects
Status
Done