Skip to content
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

Delete all categories at once in Magento 2 #3557

Closed
justinb opened this issue Feb 26, 2016 · 2 comments
Closed

Delete all categories at once in Magento 2 #3557

justinb opened this issue Feb 26, 2016 · 2 comments

Comments

@justinb
Copy link

justinb commented Feb 26, 2016

We have been experimenting with syncing our existing database(not Magento) to Magento 2.0.

In the process we have created over 1000 categories, but then we rearranged all the IDs to sync with our system. The problem is that I can no longer import the new categories as I get the error "URL key for specified store already exists." and we are getting duplicate categories now.

I think the best solution would be to clear them all out and import fresh. I found this tutorial for 1.9
https://gist.github.com/jklance/9664371

When I look at the new database I notice small differences

  1. entity_type_id is in all the old categoriy tables but none of the new ones.
  2. new database has an additional table catalog_category_product_index_tmp

My questions are these,

  1. can I use that code I found and modify to remove "entity_type_id"
    and add TRUNCATE TABLE catalog_category_product_index_tmp;
  2. or is there more I need to modify?
  3. or can you provide me a clean script to remove all categories?

we only have 1 test product in the system, so no need to worry about them

@davidalger
Copy link
Member

The GitHub issue tracker is intended for technical issues only. Please refer to the Community Forums or Magento Stack Exchange site for technical questions. In your case, the programming questions forum is likely the most appropriate. Feel free to reopen this issue if you think you have encountered a bug in Magento 2.

@justinb
Copy link
Author

justinb commented Feb 26, 2016

Sorry aobut that, I have tried all those avenues, this question is techical for those areas, no one is able to answer and my question sits unansered for days on end (magento commity forum)

magento-engcom-team pushed a commit that referenced this issue Jan 31, 2019
…Action-Group

[MFTF] MQE-1393 - Add new Customer action group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants