URL key for specified store already exists Magento 2magento 2 can't use same url key for different store view pagesMagento 2.0.7 “Urlkey for the store already exists” error while importing productsError, “URL key for specified store already exists” When I'm Adding Products or Moving a CategoryAdditional data: URL key for specified store already exists even after deleting catalog_product_entityautomatic creation of category url-key during product importURL key for specified store already exists for category and product alsoMagento 2: URL for key for specified store already exists in categoriesProduct Url Key not working rewrite and category say url key specified store already existsMagento 2 : URL key For Specified Store Already Existsimport products csv file fails with 'Specified URL key already exists in row(s)' error

Crossing the line between justified force and brutality

Increase performance creating Mandelbrot set in python

Why does indent disappear in lists?

when is out of tune ok?

How to Reset Passwords on Multiple Websites Easily?

How to write papers efficiently when English isn't my first language?

What can we do to stop prior company from asking us questions?

What is the difference between "behavior" and "behaviour"?

Valid Badminton Score?

How did Arya survive the stabbing?

How does the UK government determine the size of a mandate?

Applicability of Single Responsibility Principle

Is there a problem with hiding "forgot password" until it's needed?

Did Dumbledore lie to Harry about how long he had James Potter's invisibility cloak when he was examining it? If so, why?

Is a stroke of luck acceptable after a series of unfavorable events?

Why are there no referendums in the US?

What's the purpose of "true" in bash "if sudo true; then"

How do I find the solutions of the following equation?

Roman Numeral Treatment of Suspensions

Is exact Kanji stroke length important?

Different result between scanning in Epson's "color negative film" mode and scanning in positive -> invert curve in post?

Unreliable Magic - Is it worth it?

Lay out the Carpet

Is there a good way to store credentials outside of a password manager?



URL key for specified store already exists Magento 2


magento 2 can't use same url key for different store view pagesMagento 2.0.7 “Urlkey for the store already exists” error while importing productsError, “URL key for specified store already exists” When I'm Adding Products or Moving a CategoryAdditional data: URL key for specified store already exists even after deleting catalog_product_entityautomatic creation of category url-key during product importURL key for specified store already exists for category and product alsoMagento 2: URL for key for specified store already exists in categoriesProduct Url Key not working rewrite and category say url key specified store already existsMagento 2 : URL key For Specified Store Already Existsimport products csv file fails with 'Specified URL key already exists in row(s)' error













0















I know there are so many questions already asked related to this issue. But mine one is little difference. I created one custom module for import the products in Magento 2. In which categories will be created automatically if not exists. Its working fine. When there is no category in store but when there is any category in store and I try to define it in csv file then I am getting "URL key for specified store already exists." error. I already checked so many answers and tried so many things but not get proper success.










share|improve this question


























    0















    I know there are so many questions already asked related to this issue. But mine one is little difference. I created one custom module for import the products in Magento 2. In which categories will be created automatically if not exists. Its working fine. When there is no category in store but when there is any category in store and I try to define it in csv file then I am getting "URL key for specified store already exists." error. I already checked so many answers and tried so many things but not get proper success.










    share|improve this question
























      0












      0








      0








      I know there are so many questions already asked related to this issue. But mine one is little difference. I created one custom module for import the products in Magento 2. In which categories will be created automatically if not exists. Its working fine. When there is no category in store but when there is any category in store and I try to define it in csv file then I am getting "URL key for specified store already exists." error. I already checked so many answers and tried so many things but not get proper success.










      share|improve this question














      I know there are so many questions already asked related to this issue. But mine one is little difference. I created one custom module for import the products in Magento 2. In which categories will be created automatically if not exists. Its working fine. When there is no category in store but when there is any category in store and I try to define it in csv file then I am getting "URL key for specified store already exists." error. I already checked so many answers and tried so many things but not get proper success.







      magento2






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 29 '17 at 6:14









      IndianIndian

      1318




      1318




















          3 Answers
          3






          active

          oldest

          votes


















          2














          AFAIK, You may need to delete the URL Rewrites:



          MARKETING > SEO & Search > URL Rewrites






          share|improve this answer























          • Thanks for your reply. But I don't think its good idea to remove the URL Rewrite entries. It will affect the site when we remove it?

            – Indian
            Apr 29 '17 at 6:26











          • Yes, be careful. Seem that the url rewrites (products, categories) will be generated after running reindex. However, if you have some specific urls (cms url rewrites), they are not generated again.

            – Khoa TruongDinh
            Apr 29 '17 at 6:31











          • is there any way instead of delete delete the entry of URL Rewrites for resolve this issue?

            – Indian
            Apr 29 '17 at 6:40











          • Currently, I have no idea. It's better if we take a look the Url rewrite module, try to find the root cause. Try to use Plugin or Reference to add our custom part. Or, creating our custom one.

            – Khoa TruongDinh
            Apr 29 '17 at 6:45


















          2














          Just like every product, every category has a unique URL key too and you can’t have two products or categories with same URL key.



          You can access the URL key of any category by selecting the category from your admin panel.



          enter image description here



          So when you try to add a category through CSV that already exists you’ll get the error "URL key for specified store already exists."



          Make sure new categories have a unique name and a URL key.






          share|improve this answer






























            0














            After looking on internet for days i can't find exact solution of this.
            Then i found if we change the URLKEY of the category it will not show this error so i have done this.



            $category->setPath($parentCategory->getPath())
            ->setParentId($parentId)
            ->setName('test1')
            ->setIsActive(true)
            ->setUrlKey(rand(1,1000000000));

            $category->save();


            I use random function to add category in database with random no using ->setUrlKey(rand(1,1000000000)); you can add any thing in this like duplicate category name with some random no etc.
            and errors gone if it helps you give an UP. thanks






            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%2f172317%2furl-key-for-specified-store-already-exists-magento-2%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              AFAIK, You may need to delete the URL Rewrites:



              MARKETING > SEO & Search > URL Rewrites






              share|improve this answer























              • Thanks for your reply. But I don't think its good idea to remove the URL Rewrite entries. It will affect the site when we remove it?

                – Indian
                Apr 29 '17 at 6:26











              • Yes, be careful. Seem that the url rewrites (products, categories) will be generated after running reindex. However, if you have some specific urls (cms url rewrites), they are not generated again.

                – Khoa TruongDinh
                Apr 29 '17 at 6:31











              • is there any way instead of delete delete the entry of URL Rewrites for resolve this issue?

                – Indian
                Apr 29 '17 at 6:40











              • Currently, I have no idea. It's better if we take a look the Url rewrite module, try to find the root cause. Try to use Plugin or Reference to add our custom part. Or, creating our custom one.

                – Khoa TruongDinh
                Apr 29 '17 at 6:45















              2














              AFAIK, You may need to delete the URL Rewrites:



              MARKETING > SEO & Search > URL Rewrites






              share|improve this answer























              • Thanks for your reply. But I don't think its good idea to remove the URL Rewrite entries. It will affect the site when we remove it?

                – Indian
                Apr 29 '17 at 6:26











              • Yes, be careful. Seem that the url rewrites (products, categories) will be generated after running reindex. However, if you have some specific urls (cms url rewrites), they are not generated again.

                – Khoa TruongDinh
                Apr 29 '17 at 6:31











              • is there any way instead of delete delete the entry of URL Rewrites for resolve this issue?

                – Indian
                Apr 29 '17 at 6:40











              • Currently, I have no idea. It's better if we take a look the Url rewrite module, try to find the root cause. Try to use Plugin or Reference to add our custom part. Or, creating our custom one.

                – Khoa TruongDinh
                Apr 29 '17 at 6:45













              2












              2








              2







              AFAIK, You may need to delete the URL Rewrites:



              MARKETING > SEO & Search > URL Rewrites






              share|improve this answer













              AFAIK, You may need to delete the URL Rewrites:



              MARKETING > SEO & Search > URL Rewrites







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Apr 29 '17 at 6:17









              Khoa TruongDinhKhoa TruongDinh

              22k64187




              22k64187












              • Thanks for your reply. But I don't think its good idea to remove the URL Rewrite entries. It will affect the site when we remove it?

                – Indian
                Apr 29 '17 at 6:26











              • Yes, be careful. Seem that the url rewrites (products, categories) will be generated after running reindex. However, if you have some specific urls (cms url rewrites), they are not generated again.

                – Khoa TruongDinh
                Apr 29 '17 at 6:31











              • is there any way instead of delete delete the entry of URL Rewrites for resolve this issue?

                – Indian
                Apr 29 '17 at 6:40











              • Currently, I have no idea. It's better if we take a look the Url rewrite module, try to find the root cause. Try to use Plugin or Reference to add our custom part. Or, creating our custom one.

                – Khoa TruongDinh
                Apr 29 '17 at 6:45

















              • Thanks for your reply. But I don't think its good idea to remove the URL Rewrite entries. It will affect the site when we remove it?

                – Indian
                Apr 29 '17 at 6:26











              • Yes, be careful. Seem that the url rewrites (products, categories) will be generated after running reindex. However, if you have some specific urls (cms url rewrites), they are not generated again.

                – Khoa TruongDinh
                Apr 29 '17 at 6:31











              • is there any way instead of delete delete the entry of URL Rewrites for resolve this issue?

                – Indian
                Apr 29 '17 at 6:40











              • Currently, I have no idea. It's better if we take a look the Url rewrite module, try to find the root cause. Try to use Plugin or Reference to add our custom part. Or, creating our custom one.

                – Khoa TruongDinh
                Apr 29 '17 at 6:45
















              Thanks for your reply. But I don't think its good idea to remove the URL Rewrite entries. It will affect the site when we remove it?

              – Indian
              Apr 29 '17 at 6:26





              Thanks for your reply. But I don't think its good idea to remove the URL Rewrite entries. It will affect the site when we remove it?

              – Indian
              Apr 29 '17 at 6:26













              Yes, be careful. Seem that the url rewrites (products, categories) will be generated after running reindex. However, if you have some specific urls (cms url rewrites), they are not generated again.

              – Khoa TruongDinh
              Apr 29 '17 at 6:31





              Yes, be careful. Seem that the url rewrites (products, categories) will be generated after running reindex. However, if you have some specific urls (cms url rewrites), they are not generated again.

              – Khoa TruongDinh
              Apr 29 '17 at 6:31













              is there any way instead of delete delete the entry of URL Rewrites for resolve this issue?

              – Indian
              Apr 29 '17 at 6:40





              is there any way instead of delete delete the entry of URL Rewrites for resolve this issue?

              – Indian
              Apr 29 '17 at 6:40













              Currently, I have no idea. It's better if we take a look the Url rewrite module, try to find the root cause. Try to use Plugin or Reference to add our custom part. Or, creating our custom one.

              – Khoa TruongDinh
              Apr 29 '17 at 6:45





              Currently, I have no idea. It's better if we take a look the Url rewrite module, try to find the root cause. Try to use Plugin or Reference to add our custom part. Or, creating our custom one.

              – Khoa TruongDinh
              Apr 29 '17 at 6:45













              2














              Just like every product, every category has a unique URL key too and you can’t have two products or categories with same URL key.



              You can access the URL key of any category by selecting the category from your admin panel.



              enter image description here



              So when you try to add a category through CSV that already exists you’ll get the error "URL key for specified store already exists."



              Make sure new categories have a unique name and a URL key.






              share|improve this answer



























                2














                Just like every product, every category has a unique URL key too and you can’t have two products or categories with same URL key.



                You can access the URL key of any category by selecting the category from your admin panel.



                enter image description here



                So when you try to add a category through CSV that already exists you’ll get the error "URL key for specified store already exists."



                Make sure new categories have a unique name and a URL key.






                share|improve this answer

























                  2












                  2








                  2







                  Just like every product, every category has a unique URL key too and you can’t have two products or categories with same URL key.



                  You can access the URL key of any category by selecting the category from your admin panel.



                  enter image description here



                  So when you try to add a category through CSV that already exists you’ll get the error "URL key for specified store already exists."



                  Make sure new categories have a unique name and a URL key.






                  share|improve this answer













                  Just like every product, every category has a unique URL key too and you can’t have two products or categories with same URL key.



                  You can access the URL key of any category by selecting the category from your admin panel.



                  enter image description here



                  So when you try to add a category through CSV that already exists you’ll get the error "URL key for specified store already exists."



                  Make sure new categories have a unique name and a URL key.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 27 '17 at 14:42









                  kusumkusum

                  913




                  913





















                      0














                      After looking on internet for days i can't find exact solution of this.
                      Then i found if we change the URLKEY of the category it will not show this error so i have done this.



                      $category->setPath($parentCategory->getPath())
                      ->setParentId($parentId)
                      ->setName('test1')
                      ->setIsActive(true)
                      ->setUrlKey(rand(1,1000000000));

                      $category->save();


                      I use random function to add category in database with random no using ->setUrlKey(rand(1,1000000000)); you can add any thing in this like duplicate category name with some random no etc.
                      and errors gone if it helps you give an UP. thanks






                      share|improve this answer



























                        0














                        After looking on internet for days i can't find exact solution of this.
                        Then i found if we change the URLKEY of the category it will not show this error so i have done this.



                        $category->setPath($parentCategory->getPath())
                        ->setParentId($parentId)
                        ->setName('test1')
                        ->setIsActive(true)
                        ->setUrlKey(rand(1,1000000000));

                        $category->save();


                        I use random function to add category in database with random no using ->setUrlKey(rand(1,1000000000)); you can add any thing in this like duplicate category name with some random no etc.
                        and errors gone if it helps you give an UP. thanks






                        share|improve this answer

























                          0












                          0








                          0







                          After looking on internet for days i can't find exact solution of this.
                          Then i found if we change the URLKEY of the category it will not show this error so i have done this.



                          $category->setPath($parentCategory->getPath())
                          ->setParentId($parentId)
                          ->setName('test1')
                          ->setIsActive(true)
                          ->setUrlKey(rand(1,1000000000));

                          $category->save();


                          I use random function to add category in database with random no using ->setUrlKey(rand(1,1000000000)); you can add any thing in this like duplicate category name with some random no etc.
                          and errors gone if it helps you give an UP. thanks






                          share|improve this answer













                          After looking on internet for days i can't find exact solution of this.
                          Then i found if we change the URLKEY of the category it will not show this error so i have done this.



                          $category->setPath($parentCategory->getPath())
                          ->setParentId($parentId)
                          ->setName('test1')
                          ->setIsActive(true)
                          ->setUrlKey(rand(1,1000000000));

                          $category->save();


                          I use random function to add category in database with random no using ->setUrlKey(rand(1,1000000000)); you can add any thing in this like duplicate category name with some random no etc.
                          and errors gone if it helps you give an UP. thanks







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered yesterday









                          Ghulam.MGhulam.M

                          17211




                          17211



























                              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%2f172317%2furl-key-for-specified-store-already-exists-magento-2%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

                              Sum ergo cogito? 1 nng

                              三茅街道4182Guuntc Dn precexpngmageondP