magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.45k stars 9.29k forks source link

URL Rewrite issues occur very often /catalog/product/view/id/711/s/product-name/category/16/ #5863

Closed kayintveen closed 5 years ago

kayintveen commented 8 years ago

Summary (*)

For a long time we are struggling with URL Rewrites. When adding products and categories very often we get url structures like these. /catalog/product/view/id/711/s/product-name/category/16/

We had it with 2.0.0 and we even did a clean install of 2.1 and re-added (via import csv) the 360 products. We added the products to the categories by hand.

We noticed there is a solution by adding the category or product url by hand. but of course this is not something we want to do for 300 products and somewhere aroudn 25 categories.

We added a french and german store as well and those are 100% bad. The main store now is like 70% okay, but still 30% is not correct.

Examples (*)

How is this possible.

What we did to try to solve it is

Edit, i have found some more information. We have a site with multiple storeviews, i notice that our first store has problems with the url. when i search the url key in the url_rewrite database i do find the url for all store's (2,3,4,5,6,7,8,9,10) excpect for store. 1.

Should't there be a store 0 url key ??

Steps to reproduce -> We first created 9 different storeviews (one store, one website) -> We imported around 300 records (simple products) with specified url keys (but also tried without) via the import product functionality in the back-end -> After that we notice a lot of inconsistencies with the url keys.

Proposed solution

andimov commented 8 years ago

@kayintveen Thank you for reporting! Please, format this issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result.

kayintveen commented 8 years ago

@andimov Thank you, i just entered the steps to reproduce.

valibus commented 8 years ago

Same problem here on 2.1. We had clean url for product and after importing a csv with those 3 colums: |SKU|storeview|category|

we got bad formated url like kayintveen told you.

Did you plan to fix it, it's realy realy bad for seo.

jtw372 commented 7 years ago

Same problem here on 2.1.1.

ps202 commented 7 years ago

confirmed.

veloraven commented 7 years ago

@kayintveen it seems that you describe to issues in this report:

twistedindustries commented 7 years ago

@veloraven Is there any fix for 2.0.X yet?

kayintveen commented 7 years ago

We still have this huge issue and not one update on this. We solved it now by adding url rewrites by hand on the url_rewrite table. but everytime we add a store or something these custom rows all get dropped. making it a huge issue for us now!

Also added a Stack Overflow question of the last time we had it. http://magento.stackexchange.com/questions/158552/magento-2-url-rewrites-get-removed-when-a-indexation-is-triggered-or-something

farhadfrz commented 7 years ago

We have the same issue, 20000 products in two store views, but some url rewrites are being deleted for store 1. We have tried to regenerate url rewrites manually and from admin but after few hours they are being deleted!! Any solution??

hostep commented 7 years ago

Possibly related issue: https://github.com/magento/magento2/issues/8786

thlassche commented 7 years ago

I developed a workaround for this, a CLI command that can be used in cron, that regenerates all rewrites. Send me a message if you need it.

thisfiore commented 7 years ago

@thlassche can you send me a solution the workaround ?

IlnitskiyArtem commented 7 years ago

Hi, @kayintveen. Internal ticket MAGETWO-64295, is in our issue backlog.

royvanos commented 7 years ago

@thlassche can you send me the workaround? Thanks!

orlangur commented 7 years ago

Seems to be fixed in 2.1.8 (1222362f876afbc3f1dfa81d67e7fa954e9155aa).

kunzi commented 7 years ago

Do we need to re-import products for the problem to be fixed? Suddenly we have this problem after updating to 2.1.7 and then saving category. We lost all url rewrites for saved category and categories under that + for all products. Upgrading 2.1.8 did nothing and re-saving categories does not fix this issue.

crtl commented 6 years ago

I had the same problem with categories. In the end I found out that I had to set "Include in Menu" to yes. But then another problem occurred:

The URL was still not rewritten.

My categories arnt in the default root category. So I had to change Stores Root Category back to Default and then again to my own.

After this all rewrites for my categories now work well.

magento-engcom-team commented 6 years ago

@kayintveen, thank you for your report. We've created internal ticket(s) MAGETWO-64295 to track progress on the issue.

magento-engcom-team commented 6 years ago

Hi @kayintveen. Thank you for your report. The issue has been fixed in magento/magento2#13567 by @adrien-louis-r in 2.2-develop branch Related commit(s):

The fix will be available with the upcoming 2.2.4 release.

magento-engcom-team commented 6 years ago

Hi @kayintveen. Thank you for your report. The issue has been fixed in magento/magento2#14252 by @rostyslav-hymon in 2.3-develop branch Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

sunilk4y commented 6 years ago

Is there any patch available to fix this issue, or we have to keep waiting for 2.3.0 ( any tentative date for 2.3.0 release. we have nor than 1,000 products with URL like this https://www.makevana.com.au/catalog/product/view/id/4827/s/gold-plated-sterling-silver-clover-leaf-earrings/category/226/ and its very annoying and hurting indexing.

kayintveen commented 6 years ago

Thanks @magento-engcom-team Awesome.. indeed is there a patch or concrete info on 2.3?

mille2018 commented 6 years ago

This is very bad for SEO :( Any update to fix or concrete info on 2.3?

nikolakisae commented 6 years ago

Any update or patch for this issue? We also loosing a lot of url rewrites after product import!

peterjaap commented 6 years ago

@magento-engcom-team that is not the fix, that is just an integration test. Could you refer us to the actual commit that fixes it?

marco7319 commented 6 years ago

same problem with magento 2.2.3 - I have 7500 products

angelflo commented 6 years ago

same problem with 2.2.4

SnowCommerceBrand commented 6 years ago

Hello, I am running 2.2.4 and can confirm this is not fixed for our multi store platform.

The fix will be available with the upcoming 2.2.4 release. @magento-engcom-team

We have category urls for a store view that will not generate even manually saving under Marketing tab. Error states "Request Path for Specified Store already exists." when trying to make a custom redirect for view/s/ url

How can we make the url not show the view/s/ syntax and show a standard category url like catalog/category/view/id/1618

Where does view/s/ get added into the url from? catalog/category/view/s/{SEO}/id/1497/ catalog/category/view/id/1618

SnowCommerceBrand commented 6 years ago

@angelflo Since you seem to be having similar issue I just found something that seemed to fix the issue for us. At the store view level of your category can you check if the use default was unchecked and the value at store level and default level are the same value ? Uploaded image showing website and store level as what was our issue we had to remove db entries from url_rewrite table since they generated incorrectly. https://ibb.co/jHH2yd

simonworkhouse commented 6 years ago

@SnowCommerceBrand We have been experiencing similar issues (on 2.2.5) and I believe that we have located the cause. Removing the DB entries from the url_rewrite table will only help in the short term and won't prevent the issue from returning.

Unfortunately the fix would require changes to the Magento 2 core and issues like this have been reported since 2016 without any fix yet. Hopefully the core team can get their act together and resolve this one.

See https://github.com/magento/magento2/issues/17378.

simonworkhouse commented 6 years ago

@magento-engcom-team Please take a look at https://github.com/magento/magento2/issues/17378

ghost commented 6 years ago

@thlassche You are a very bad example how to gain huge profit from open source. You should be removed from the Github platform because you are selling your solutions as products for benefits on a open source platform. This is against all that open source stands for. And if people start copying your behavior open source will quickly Die. And open source software will be unaffordable for a lot of people. We should not buy this solutions we should avoid it at all times even if magento sucks in fixing things from 2006 till now. Is there any Developer that purchased this software already from this man? Maybe you can make the solution available for every one.

hostep commented 6 years ago

@koopjesboom: if I remember correctly, @thlassche worked on this solution at the time when Magento devs showed very little interest in PR's being created or issues reported. And even then, it takes a lot of work to figure out how these url rewrites work in Magento 2 (I've spend like more then 100 hours on various issues with those things), not everyone wants to offer all that time they've invested in writing a solution for this up for free.

We've been very happy with @thlassche's solution and use it on a couple of shops, because Magento still shows no signs of wanting to fix this properly. And trying to fix all the url rewrite issues is a lot of work since that whole Magento Urlrewrite module is insanely complex to even try to understand how it works. I'm happy to pay 50 bucks for an easy solution instead of wasting 10, 20, 30, ... hours of doing manual cleanup work and trying to get proper url rewrites.

But I do want to see a solution one day in Magento to fix this by:

ghost commented 6 years ago

@hostep

Best, I was expecting an answer like this.

I am totally aware that it is easy to use a extension written to resolve (open source) problems. But that is not the point.

If a programmer put 100 hours in a solution for an open source platform it is not open source to blame. If every problem in open source will be put in a extension and sold do you think open source is still open? Open source solutions should be free. This payed solution is not to help, but to gain profit. Every where I look on the forums where this particular URL Rewrite issues problem pops up this extension is offered. All Open source platforms should avoid Payed solutions Public forums. To keep Open source Open. And not a Payed solutions platform.

To mention that the unknown are not paying huge amounts of money to developers that use this extension to resolve the issue in there clients open-source environment and tell the client it was 10 hours of work. Yes, this is what is going on wit so called payed open source solutions. And this happens not only with this particular issue, i see this a lot.

And yes our opinions can be different, which is a good thing. But don't forget where open source (and the Magento Community) stands for.

If Magento had clean and well functioning fully tested and bug free final version we were not talking about these issues and this payed solution wasn't there. I am hoping one day Magento final versions will be like this.

My final words about this.

RishabhRkRai commented 6 years ago

I also got the same error. But we have Single Store Mode enabled. Using Magento 2.1.9

If we see the product URL, it correct in elsewhere like Search, in another category. But the same product in another category have the url like catalog/product/view/id/13761/s/proudct_name/category/category_id

When we resassociate that product from that category and save the category, URL get corrected. But the next day it again shown as previous.

marco7319 commented 6 years ago

same problem with 2.2.5 is it a problem of magento or magmi?

ghost commented 6 years ago

@marco7319

Magento

Best regards

naseemqota commented 5 years ago

I also got the same error. But we have Single Store Mode enabled. Using Magento 2.1.9

If we see the product URL, it correct in elsewhere like Search, in another category. But the same product in another category have the url like catalog/product/view/id/13761/s/proudct_name/category/category_id

When we resassociate that product from that category and save the category, URL get corrected. But the next day it again shown as previous.

i have solution for that. but i do that manually from dbs for now. i'm creating a plugin for that and send it you guys. if any one needs help for doing that manually please contact feel free.

samuelmafra commented 5 years ago

Same problem with 2.2.5. @nasimqota waiting for you solution Thanks

ghost commented 5 years ago

Same problem with version 2.2.6 @nasimqota Also waiting for your solution. Thank you very much for the effort.

axovel commented 5 years ago

Same problem on 2.2.1 .

michel334 commented 5 years ago

Same problem on 2.2.3. Problem arises after creating Multistore (extra store view). SEO is tanking. How is this even possible??

jlfguthrie commented 5 years ago

Any know fixes available? 2.2.6 still an issue. Mixed success with: https://github.com/olegkoval/magento2-regenerate_url_rewrites

ghost commented 5 years ago

@jlfguthrie

Best,

My multi store setup has the same issues . If i use the tool from Oleg Koval and i choose for store id 1 all URL's are fine. If i choose Store id 3 Nothing happens and the URLs get a double forward slash into them. For example https://mysite//category/product https://mysite-->//<--category/product Which results in a lot of unreachable pages.

I m using the same tool From Oleg Koval. Struggling these URL rewrites for a long time.

Our problems are Partly repaired by Oleg Koval, thanks for the help so far.

Best regards

divya-muralidharan commented 5 years ago

I have the same issue in Magento 2.2.5 with migrated data from Magento 1.9.2.4. Is there any fix to resolve this?

ihor-sviziev commented 5 years ago

Hi @engcom-backlog-nazar, Fix for 2.2.x release line was included into 2.2.4 release, but according to comments - looks like people still have this issue. Could you re-check if this issue?

ghost commented 5 years ago

@ihor-sviziev ok.

hostep commented 5 years ago

@ihor-sviziev, @engcom-backlog-nazar, maybe the following tickets might help because they contain exacts steps to reproduce some issues mentioned in this thread:

There is also a pending PR which seems to slightly solve part of the problem, but it doesn't seem to be moving forward for multiple months now:

magento-engcom-team commented 5 years ago

Hi @engcom-backlog-nazar. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

magento-engcom-team commented 5 years ago

@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-97633, MAGETWO-97634 were created