Skip to content

Product Import: Please make sure attribute "url_key" is not empty. #14478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
duffner opened this issue Mar 31, 2018 · 3 comments
Closed

Product Import: Please make sure attribute "url_key" is not empty. #14478

duffner opened this issue Mar 31, 2018 · 3 comments
Labels
Component: ImportExport Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@duffner
Copy link

duffner commented Mar 31, 2018

Preconditions

  1. Magento 2.2.3
  2. Import headers as below.

sku,url_key,color,shape,shop_by_finish,tile_material,tile_size2,categories,name,description,short_description,weight,price,meta_title,meta_keywords,meta_description,qty,base_image,base_image_label,small_image,small_image_label,thumbnail_image,thumbnail_image_label,attribute_set_code,product_type,product_websites,product_online,tax_class_name,visibility

Steps to reproduce

  1. Create .csv import with column url_key empty for each row in .csv
  2. All other validations pass
  3. Press Check data, it gives the error: Please make sure attribute "url_key" is not empty.

Expected result

  1. url_key is not a required column according to documentation. This should pass validation and a url key should be created programmatically if not defined upon import.

Actual result

  1. Can't create products without specifying url_key

I'm guessing it was broken by this ticket: #12641
This was URL key being generated by the import even the column wasn't defined, which is what I'm expecting as well. My guess is that the column url_key should be specified but empty for new products.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Mar 31, 2018
@koenner01
Copy link
Contributor

As a temporary solution you could use \Magento\Framework\Filter\FilterManager which contains a function translitUrl() where you can pass the product name to 'generate' the url_key

@sylvainraye
Copy link
Contributor

Problem is still there and annoying on Magento 2.2.4.

It's also related to this fix #12083 which break the fact that url_key can be set to '' (empty string) via the class vendor/magento/module-catalog-import-export/Model/Import/Product.php:1563 => $rowData[self::URL_KEY] = $this->getUrlKey($rowData);.

@koenner01 doing that means that you overwrite existing url_key which is not always expected

@ghost
Copy link

ghost commented Jul 16, 2018

Hi @duffner hank you for your report.
The issue is already fixed in 2.2-develop branch

@ghost ghost added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Fixed in 2.2.x The issue has been fixed in 2.2 release line Component: ImportExport labels Jul 16, 2018
@ghost ghost closed this as completed Jul 16, 2018
@ghost ghost removed their assignment Jul 16, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ImportExport Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

4 participants