-
Notifications
You must be signed in to change notification settings - Fork 9.4k
URL key for specified store already exists - over 51 bugs reported - still not fixed #10265
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
Comments
They are closed for a reason. Most of such issues occur when database is filled directly with some migration scripts and after that products/categories appear in unmanageable state. Here you can read about the difference in URL Rewrites behavior between Magento 1 and Magento 2: #10242 (comment) Not closed ones are simply not processed yet. Some improvements are done in scope of #6671 (currently a part of |
@orlangur thanks for the feedback. I am afraid i do not get your approach here. I do not think your approach is right here just to say "it is a problem of some migration scripts" - you can read multiple posts where this occurs also by using the official magento2 migration tool! Anyways - it is the same like with most bugs reported here. It is not the fault of the magento team and will maybe fixed in 2.x.x - maybe in a year, maybe never. This approach can be seen here all over and over again to most of the bugs reported. Not shure if this is a good approach at all. |
"Bugs" regarding "URL key for specified store already exists" are only reported because of misunderstanding of how URL Rewrites behave in Magento 2 compared to Magento 1. There is nothing to "fix" with it and no simple fix exists at all. In Magento 1 URL Rewrites were regenerated in background via indexer, it added random numeric suffixes in case of collision and DID NOT preserve previously generated values (this is the main problem from SEO perspective). In Magento 2 URL Rewrites are generated immediately when you change value in Admin UI, which means you can easily see any collisions and solve them by editing current or conflicting product/category. "it is a problem of some migration scripts" just means that you will not meet a problem if you enter products via Admin UI or by properly saving product model in script. BUT if you change some database tables directly via some hacky scripts validation will not occur and thus you may meet troubles later. Is it clear now? How would you suggest to change Magento 2 current behavior? |
It would only be a bug if you're saving, in fact, a unique entry. What I would argue is that it would be an improvement if this feature was restored (not "fixed", but implemented) - clearly, there's plenty of users who'd like to have it. However, it might also make sense to have it disabled by default for various reasons including the ones mentioned by @orlangur above and some SEO considerations as well (with ability to enable this feature via admin or Anyhow, the point is that having these errors shown to the user is currently considered expected behavior. Thus, if you'd like it changed or removed, the only options suggested by Magento, Inc. are: |
Ok - this may be right - but i think if even your team with the official magento2 data migration tool fails to understand the new logic how can a external developer get it? The solution for this problem and any problem regarding URLs and URL rewrites is quite simple in my opinion. --> Include a script which first deletes all URL generated data an 2nd regenerates the data from scratch on. There are some extensions out there which do that but there are also many problems with these as the logic behind magento2 url rewrites is not reported enough. For example how can it be that if you truncate the url_rewrite table and regenerate it with a script the error "URL key for specified store already exists" still exists? The logic implemented right now also has a huge downside: |
This sounds disastrous from SEO perspective. Unless you provide generate accompanying 301 redirects, you'll lose the traffic to these pages from the search engine results. BTW There's some reassuring feedback on the topic provided by a Magento employee quite recently: #10242 (comment) |
The script just enjures that the settings in the backend (like category urls/ product urls etc) are generated properly. If you place 301 redirects via the magento interface you should overthink your seo strategy at all ;-) |
It means the data is invalid and contains some collisions which needs to be resolved. You can try |
@orlangur thanks - this is clear so far but where does our developer now get the exact function how the url and url-rewrites are generated in magento2. Which tables are included in the generation and how exactly are the url generated. Without this information it takes hours or days to try to suggest what is happening. |
I have found a workaround for this: (Tried in magento 2.1.7) |
I think it the problem with this error has something to do with not active categories imported in magento2. These categories set to "disabled" in the backend seem not to be taken into account somehow in the magento2 system if they are imported and caused the error in our case. We deleted the not active categories and is is fine for the moment for us. |
@andidhouse I saw a similar bug report recently about "Not Visible Individually" Visibility value not tracked properly from URL Rewrites perspective. By
do you mean |
Hi @orlangur. We used Uber Data migration tool as the native magento2 data migration tool was not working for our sites. But i think it is caused by the deactivated status (at least in our case) - so i am not shure if m2 handles deactivated categories / products right on import. Maybe this could be checked? |
Sure, just fill an issue corresponding to https://github.com/magento/magento2/blob/develop/ISSUE_TEMPLATE.md (the main part is observed/expected result) as current issue is hardly manageable. If some third-party tool built on top of Magento import is not working as expected the problem could be in tool itself also, ideally if the tool vendor would identify piece of Magento import code which causes a bug. |
System behaves normally in current implementation if your data is valid in the first place. If https://github.com/magento/data-migration-tool produces invalid data in some cases, it should be reported. |
I am 100% shure this will come up again - so this is closed and then another ticket is created. I am not shure what the meaning of this is as this was reported in different forums several times again and again. But ok - lets see what happens. |
Sry to write one more time here but what is happening here with bugreports?
Search for the bug: "URL key for specified store already exists"
Shows 20 open bugreports and 31 closed ones - AND the issue is still present in ALL magento2 versions including the latest release 2.1.7
I really do not know what is happening here?
The text was updated successfully, but these errors were encountered: