I have been adding categories for different types of aircraft, under a subcategory called "aircraft," which is a subcategory of the default root category. At one point, I created a category called "bombers" and saved it. It showed up in the treeview. Then, I created a category called "cargo" and it showed up under treeview, but "bombers" disappeared. When I tried to re-enter "bombers," I got the dreaded "URL key for specified store already exists." The category "bombers" does not show up in the admin treeview, and it does not show up on the front end either.
When I looked in the database, I saw there is an entry for "bombers" in the catalog_category_entity_varchar table (see below). Do I/can I just delete this one entry and try adding it again via the admin screen, or is it not that simple? What should I do? Thank you.
Hi @radman63,
Can you check into the URL Rewrites
And search the word bombers on this column:
Maybe you've created a permanent redirect?
Thanks for your reply. I have never been in the marketing section, let alone the URL rewrites part of it. "Bombers" is there, but I do not think there are any redirects for it, or anything else. Here's what is there.
I guess the problem is when you try to create the category Bombers into the Aviation category, Magento can't add it becasue there will be 2 categories with the same URL.
If currently you don't have a category called Bombers, you can try to rename those redirects and then to create the category Bombers.
Since the aviation/bombers.html doesn't exists anymore you should be able to create it.
If you are not completely sure, remember to make a backup before.
Thanks for your reply.
1. Rename the redirects: Rename them to what? Can't I just delete them?
2. What about the entry for "bombers" in the catalog_category_entity_varchar table? Should I/can I delete that? Won't it prevent me from adding "Bombers" if it exists in this table also?
3. "If currently you don't have a category called Bombers..."
Well, I do and I don't. I seem to have to have it in the database and the redirects section of marketing in the admin, but the category does not appear in the admin treeview of categories, or on the front end.
Since I do not have any products associated with "Bombers," I would just like to delete all references to it in the database and anywhere else, and just start over. Wouldn't that be best? How exactly do I do that? All the help articles on the web only talk about deleting ALL categories from the database, and I only want to delete this one. Thanks.
Regards,
Bill
Hi @radman63,
1. Yes, you can. I'm just trying to recommend you to NOT delete things because if something fails I could be responsable for that recomendation. (But if you feel confident move forward, you can delete that redirect).
2. You said you've tried to add the category and you wasn't able. Is the category Bombers already created?
3. I guess it will disappear when you delete the redirect.
Thanks for your reply. I didn't try to do anything yet. I will work on this tonight.
I have a backup of the database, so I'm not too worried about things. Also, it's a new site, and I only have one product so far, so there's not much to break at this point.
Rename the redirects
1. Yes, you can. I'm just trying to recommend you to NOT delete things because if something fails I could be responsible for that recommendation. (But if you feel confident move forward, you can delete that redirect).
I just would rather delete the redirects than try to rename them to something else, because I do not know what to rename them to, and there are no products or pages associated with bombers yet anyway.
Entry for "bombers" in the catalog_category_entity_varchar table
2. You said you've tried to add the category and you wasn't able. Is the category Bombers already created?
I don't know. I guess it depends on what you mean by "created." I went through the process of creating it, but when I created another category, the category "bombers" disappeared from the treeview, it never showed up in the front-end navigation, and I get an error when I try to create it again. However, there is an entry in the database in the afore-mentioned table, and there are the redirects and the error when trying to add again. I guess it was not PROPERLY created, but there are fingerprints in the system.
3. I guess it will disappear when you delete the redirect.
Deleting the redirects will make the entry for "bombers" disappear in the catalog_category_entity_varchar table?
Sure. Makes sense. I was asking about the entry in catalog_category_entity_varchar table though. Can I/should I delete that also? Thanks.
Yes, but take a look at the entity_id column value.
That value will match with the entity_id column on catalog_category_entity table.
And if you delete the values from the catalog_category_entity table, values from child tables should be deleted becasue the foreign keys.