Key constraint error while importing simple productsImporting produtcs with images from .csv file errorMagento 2.2 data migration Duplicate store_group_name EntriesGetting an error while importing products on Magento from my other storeError running SQL Query - Cannot truncate a table referenced in a foreign key constraintMagento 2 import unique URL key errorProducts not importing via CSV - Magento 2.2.3Magento 2: FastSimpleImport Integrity constraint violationAttributes error on importing Magento 2 productsFacing error when importing virtual product in magento2Exporting Products from 1.9.1 and IMPORTING into 1.9.4 gives “Column names: ”cube_category_Bestsellers“ are invalid” Error

Math equation in non italic font

Custom alignment for GeoMarkers

Is it insecure to send a password in a `curl` command?

Bach's Toccata and Fugue in D minor breaks the "no parallel octaves" rule?

A diagram about partial derivatives of f(x,y)

Why is the President allowed to veto a cancellation of emergency powers?

Book: Young man exiled to a penal colony, helps to lead revolution

I got the following comment from a reputed math journal. What does it mean?

What did “the good wine” (τὸν καλὸν οἶνον) mean in John 2:10?

How could an airship be repaired midflight?

Does .bashrc contain syntax errors?

How could a scammer know the apps on my phone / iTunes account?

Relationship between sampajanna definitions in SN 47.2 and SN 47.35

Instead of a Universal Basic Income program, why not implement a "Universal Basic Needs" program?

Happy pi day, everyone!

Are ETF trackers fundamentally better than individual stocks?

How to explain that I do not want to visit a country due to personal safety concern?

Different outputs for `w`, `who`, `whoami` and `id`

Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?

Adventure Game (text based) in C++

Official degrees of earth’s rotation per day

How to get the n-th line after a grepped one?

ERC721: How to get the owned tokens of an address

Most cost effective thermostat setting: consistent temperature vs. lowest temperature possible



Key constraint error while importing simple products


Importing produtcs with images from .csv file errorMagento 2.2 data migration Duplicate store_group_name EntriesGetting an error while importing products on Magento from my other storeError running SQL Query - Cannot truncate a table referenced in a foreign key constraintMagento 2 import unique URL key errorProducts not importing via CSV - Magento 2.2.3Magento 2: FastSimpleImport Integrity constraint violationAttributes error on importing Magento 2 productsFacing error when importing virtual product in magento2Exporting Products from 1.9.1 and IMPORTING into 1.9.4 gives “Column names: ”cube_category_Bestsellers“ are invalid” Error













2















I am getting an error when I am importing simple products in Magento 2.2.



The error is :




  1. Category " has not been created. URL key for specified store already exists. in row(s): 1 General system exception happened
    Additional data: SQLSTATE[23000]: Integrity constraint violation: 1452
    Cannot add or update a child row: a foreign key constraint fails
    (`acbwqvzgyr`.`catalog_category_product`, CONSTRAINT
    `CAT_CTGR_PRD_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY
    (`category_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON
    DELETE CASCAD), query was: INSERT INTO `catalog_category_product`
    (`product_id`,`category_id`,`position`) VALUES (?, ?, ?), (?, ?, ?) ON
    DUPLICATE KEY UPDATE `product_id` = VALUES(`product_id`),
    `category_id` = VALUES(`category_id`)




How can I solve this issue?










share|improve this question
















bumped to the homepage by Community 21 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • If your importing multiple products with same name then getting above error. Please remove same name products and try again.

    – Abdul
    Dec 2 '17 at 12:23















2















I am getting an error when I am importing simple products in Magento 2.2.



The error is :




  1. Category " has not been created. URL key for specified store already exists. in row(s): 1 General system exception happened
    Additional data: SQLSTATE[23000]: Integrity constraint violation: 1452
    Cannot add or update a child row: a foreign key constraint fails
    (`acbwqvzgyr`.`catalog_category_product`, CONSTRAINT
    `CAT_CTGR_PRD_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY
    (`category_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON
    DELETE CASCAD), query was: INSERT INTO `catalog_category_product`
    (`product_id`,`category_id`,`position`) VALUES (?, ?, ?), (?, ?, ?) ON
    DUPLICATE KEY UPDATE `product_id` = VALUES(`product_id`),
    `category_id` = VALUES(`category_id`)




How can I solve this issue?










share|improve this question
















bumped to the homepage by Community 21 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • If your importing multiple products with same name then getting above error. Please remove same name products and try again.

    – Abdul
    Dec 2 '17 at 12:23













2












2








2








I am getting an error when I am importing simple products in Magento 2.2.



The error is :




  1. Category " has not been created. URL key for specified store already exists. in row(s): 1 General system exception happened
    Additional data: SQLSTATE[23000]: Integrity constraint violation: 1452
    Cannot add or update a child row: a foreign key constraint fails
    (`acbwqvzgyr`.`catalog_category_product`, CONSTRAINT
    `CAT_CTGR_PRD_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY
    (`category_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON
    DELETE CASCAD), query was: INSERT INTO `catalog_category_product`
    (`product_id`,`category_id`,`position`) VALUES (?, ?, ?), (?, ?, ?) ON
    DUPLICATE KEY UPDATE `product_id` = VALUES(`product_id`),
    `category_id` = VALUES(`category_id`)




How can I solve this issue?










share|improve this question
















I am getting an error when I am importing simple products in Magento 2.2.



The error is :




  1. Category " has not been created. URL key for specified store already exists. in row(s): 1 General system exception happened
    Additional data: SQLSTATE[23000]: Integrity constraint violation: 1452
    Cannot add or update a child row: a foreign key constraint fails
    (`acbwqvzgyr`.`catalog_category_product`, CONSTRAINT
    `CAT_CTGR_PRD_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY
    (`category_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON
    DELETE CASCAD), query was: INSERT INTO `catalog_category_product`
    (`product_id`,`category_id`,`position`) VALUES (?, ?, ?), (?, ?, ?) ON
    DUPLICATE KEY UPDATE `product_id` = VALUES(`product_id`),
    `category_id` = VALUES(`category_id`)




How can I solve this issue?







magento2.2 import-products






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 29 '18 at 11:45









Shashank Kumrawat

1,3081343




1,3081343










asked Dec 2 '17 at 7:48









Ali_2017Ali_2017

111




111





bumped to the homepage by Community 21 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 21 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • If your importing multiple products with same name then getting above error. Please remove same name products and try again.

    – Abdul
    Dec 2 '17 at 12:23

















  • If your importing multiple products with same name then getting above error. Please remove same name products and try again.

    – Abdul
    Dec 2 '17 at 12:23
















If your importing multiple products with same name then getting above error. Please remove same name products and try again.

– Abdul
Dec 2 '17 at 12:23





If your importing multiple products with same name then getting above error. Please remove same name products and try again.

– Abdul
Dec 2 '17 at 12:23










2 Answers
2






active

oldest

votes


















0














It seems that your csv has a new category on category column and it is not able to create category due to duplicate name [which is eventually throwing duplicate url issue].



My suggestion would be first create categories separately and them do product import.



Also you can use api to import data where you can check the duplicate url key before you insert a data.



Let me know if you need help on API code.






share|improve this answer






























    0














    In your csv file you have at least one empty cell in the 'categories' column, thus the error message is



    Category " has not been created.


    Fill in a value and try it again.






    share|improve this answer






















      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "479"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f204176%2fkey-constraint-error-while-importing-simple-products%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      It seems that your csv has a new category on category column and it is not able to create category due to duplicate name [which is eventually throwing duplicate url issue].



      My suggestion would be first create categories separately and them do product import.



      Also you can use api to import data where you can check the duplicate url key before you insert a data.



      Let me know if you need help on API code.






      share|improve this answer



























        0














        It seems that your csv has a new category on category column and it is not able to create category due to duplicate name [which is eventually throwing duplicate url issue].



        My suggestion would be first create categories separately and them do product import.



        Also you can use api to import data where you can check the duplicate url key before you insert a data.



        Let me know if you need help on API code.






        share|improve this answer

























          0












          0








          0







          It seems that your csv has a new category on category column and it is not able to create category due to duplicate name [which is eventually throwing duplicate url issue].



          My suggestion would be first create categories separately and them do product import.



          Also you can use api to import data where you can check the duplicate url key before you insert a data.



          Let me know if you need help on API code.






          share|improve this answer













          It seems that your csv has a new category on category column and it is not able to create category due to duplicate name [which is eventually throwing duplicate url issue].



          My suggestion would be first create categories separately and them do product import.



          Also you can use api to import data where you can check the duplicate url key before you insert a data.



          Let me know if you need help on API code.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 2 '17 at 8:01









          Sandipan SSandipan S

          47137




          47137























              0














              In your csv file you have at least one empty cell in the 'categories' column, thus the error message is



              Category " has not been created.


              Fill in a value and try it again.






              share|improve this answer



























                0














                In your csv file you have at least one empty cell in the 'categories' column, thus the error message is



                Category " has not been created.


                Fill in a value and try it again.






                share|improve this answer

























                  0












                  0








                  0







                  In your csv file you have at least one empty cell in the 'categories' column, thus the error message is



                  Category " has not been created.


                  Fill in a value and try it again.






                  share|improve this answer













                  In your csv file you have at least one empty cell in the 'categories' column, thus the error message is



                  Category " has not been created.


                  Fill in a value and try it again.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 29 '18 at 11:37









                  digijaydigijay

                  10114




                  10114



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Magento Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f204176%2fkey-constraint-error-while-importing-simple-products%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Disable / Remove link to Product Items in Cart Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How can I limit products that can be bought / added to cart?Remove item from cartHide “Add to Cart” button if specific products are already in cart“Prettifying” the custom options in cart pageCreate link in cart sidebar to view all added items After limit reachedLink products together in checkout/cartHow to Get product from cart and add it againHide action-edit on cart page if simple productRemoving Cart items - ObserverRemove wishlist items when added to cart

                      Helsingin valtaus Sisällysluettelo Taustaa | Yleistä sotatoimista | Osapuolet | Taistelut Helsingin ympäristössä | Punaisten antautumissuunnitelma | Taistelujen kulku Helsingissä | Valtauksen jälkeen | Tappiot | Muistaminen | Kirjallisuutta | Lähteet | Aiheesta muualla | NavigointivalikkoTeoksen verkkoversioTeoksen verkkoversioGoogle BooksSisällissota Helsingissä päättyi tasan 95 vuotta sittenSaksalaisten ylivoima jyräsi punaisen HelsinginSuomalaiset kuvaavat sotien jälkiä kaupungeissa – katso kuvat ja tarinat tutuilta kulmiltaHelsingin valtaus 90 vuotta sittenSaksalaiset valtasivat HelsinginHyökkäys HelsinkiinHelsingin valtaus 12.–13.4. 1918Saksalaiset käyttivät ihmiskilpiä Helsingin valtauksessa 1918Teoksen verkkoversioTeoksen verkkoversioSaksalaiset hyökkäävät Etelä-SuomeenTaistelut LeppävaarassaSotilaat ja taistelutLeppävaara 1918 huhtikuussa. KapinatarinaHelsingin taistelut 1918Saksalaisten voitonparaati HelsingissäHelsingin valtausta juhlittiinSaksalaisten Helsinki vuonna 1918Helsingin taistelussa kaatuneet valkokaartilaisetHelsinkiin haudatut taisteluissa kaatuneet punaiset12.4.1918 Helsingin valtauksessa saksalaiset apujoukot vapauttavat kaupunginVapaussodan muistomerkkejä Helsingissä ja pääkaupunkiseudullaCrescendo / Vuoden 1918 Kansalaissodan uhrien muistomerkkim

                      Adjektiivitarina Tarinan tekeminen | Esimerkki: ennen | Esimerkki: jälkeen | Navigointivalikko