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.
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.
@kayintveen
Thank you for reporting!
Please, format this issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result.
@andimov Thank you, i just entered the steps to reproduce.
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.
Same problem here on 2.1.1.
confirmed.
@kayintveen it seems that you describe to issues in this report:
@veloraven Is there any fix for 2.0.X yet?
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
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??
Possibly related issue: https://github.com/magento/magento2/issues/8786
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.
@thlassche can you send me a solution the workaround ?
Hi, @kayintveen. Internal ticket MAGETWO-64295, is in our issue backlog.
@thlassche can you send me the workaround? Thanks!
Seems to be fixed in 2.1.8 (1222362f876afbc3f1dfa81d67e7fa954e9155aa).
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.
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.
@kayintveen, thank you for your report.
We've created internal ticket(s) MAGETWO-64295 to track progress on the issue.
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.
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.
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.
Thanks @magento-engcom-team Awesome.. indeed is there a patch or concrete info on 2.3?
This is very bad for SEO :( Any update to fix or concrete info on 2.3?
Any update or patch for this issue? We also loosing a lot of url rewrites after product import!
@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?
same problem with magento 2.2.3 - I have 7500 products
same problem with 2.2.4
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
@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
@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.
@magento-engcom-team Please take a look at https://github.com/magento/magento2/issues/17378
@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.
@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:
url_key
(categories & products) or url_path
(categories only)@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.
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.
same problem with 2.2.5
is it a problem of magento or magmi?
@marco7319
Magento
Best regards
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.
Same problem with 2.2.5.
@nasimqota waiting for you solution
Thanks
Same problem with version 2.2.6
@nasimqota Also waiting for your solution.
Thank you very much for the effort.
Same problem on 2.2.1 .
Same problem on 2.2.3. Problem arises after creating Multistore (extra store view). SEO is tanking. How is this even possible??
Any know fixes available? 2.2.6 still an issue.
Mixed success with: https://github.com/olegkoval/magento2-regenerate_url_rewrites
@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
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?
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?
@ihor-sviziev ok.
@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:
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:
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.[x] 2. Verify that the issue is reproducible on 2.3-develop
branchDetails
- Add the comment @magento-engcom-team give me 2.3-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop
branch, please, add the label Reproduced on 2.3.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[x] 3. Verify that the issue is reproducible on 2.2-develop
branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop
branch, please add the label Reproduced on 2.2.x
[ ] 4. If the issue is not relevant or is not reproducible any more, feel free to close it.
@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-97633
, MAGETWO-97634
were created
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.
Can you please send me the solution for this issue.
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.
If you could send me this that would be really appreciated.
@vrcodem, @dpdesignthatfits: he refers to his extension on the marketplace: https://marketplace.magento.com/thlassche-regeneraterewrites.html
We've used it in a few cases and it was able to fix most of the problems we ran into with url rewrites on certain projects.
@thlassche Could you please send the cron to me please
confrming the issue also on 2.2.7 to
/catalog/category/view/s/product-name/id/613/
throwing 404 error the view dosen't exists
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.
send me the solution pleaase
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.
@thlassche Please send me the solution, thank you.
@thlassche I would appreciate this solution as well.
@thlassche Same issue. May you share your solution please ?
@surao101 @billsideris @facetimer @JMLucas96 @sts-ryan-holton
There are multiple extensions that you could use to regenerate the rewrites. Here are a few;
https://github.com/elgentos/regenerate-catalog-urls
https://github.com/experius/Magento2-Module-Experius-ReindexCatalogUrlRewrites
https://marketplace.magento.com/thlassche-regeneraterewrites.html
https://github.com/olegkoval/magento2-regenerate_url_rewrites
Thanks, The one by olegkoval worked perfectly for me.
@surao101 Thank you!
https://github.com/olegkoval/magento2-regenerate_url_rewrites
This solution is perfect.
Yep, I used this one https://github.com/olegkoval/magento2-regenerate_url_rewrites as well and seems to work fine.
I use this extension because I can regenerate the URLs from admin and I can format the URLs however I want
https://marketplace.magento.com/webpanda-catalog-url-rewrites.html
Very odd, I started getting this problem too after upgrading to 2.3.1 from 2.3.0 on my single view site (single-mode is on).
Before the upgrade, URL Rewrites used to be generated correctly upon creation of a new product, but they no longer do. I realised thanks to Google Search Console.
In the meantime, olegkoval's solution works for me, but one would expect URLs to just work in Magento...
@jaxtheking i have observed the same thing... also upgraded to 2.3.1 and url rewrites dont auto generate... Google Search Console Errors keep piling up...
We are also face same issue after migrating from 1.9.x to 2.2.x.
This is a complete head ache for us
Hi @kayintveen.
Thank you for your report and collaboration!
The issue was fixed by Magento team.
The fix will be available with the upcoming 2.2.10
release.
Hi @kayintveen.
Thank you for your report and collaboration!
The issue was fixed by Magento team.
The fix will be available with the upcoming 2.3.3
release.
Hi @magento-engcom-team,
Where we can find changes that fixes this issue?
I dont understand.
3 years later and: "The fix will be available with the upcoming 2.3.3 release"
kayintveen commented on 28 Jul 2016 •
11-07-2019 Hi at magento-engcom-team, Where we can find changes that fixes this issue?
URL rewrites is a complicated system which is giving problems for years now in magento 2
I think it is caused by getting from a staging/test/development setup to live.
So for example from http://dev.website.com to https://website.com
A clean installed magento 2 on staging/test/development setup has no issues with URL rewrites.
Multistore same problem for the last three years, since Magento 2.0 was launched.
https://www.fashionplaza.com.au/ and https://www.makevana.com.au/. sick of Magento multi-store now. never set up dev store, But Magento was installed on a live website.
@mille2018
If it breaks from the start something is wrong with the server or there are installed extensions are breaking your site. From scratch i have never had the URL rewrite issues.
My URL rewrites breaks sometimes after:
Some S.E.O. extensions can also break your site,
1 Always enable error logging or error reporting and Check your logs first
2 Check caching and indexers are working properly.
3 Check your folder permissions
4 Try clean install without extensions only a theme.
Create some categories en products.
Check rewrites.
5 Install extensions 1 by one.
After each extension installation check the rewrites.
After each installation of a extension run below command in SSH (putty) from your installation folder (public_html or a custom folder) and change setup:static-content:deploy to your desired languages. for example setup:static-content:deploy en_US or setup:static-content:deploy nl_NL de_DE
rm -rf var/di/; rm -rf pub/static/; rm -rf var/cache/; rm -rf var/pagecache/; rm -rf generated/; rm -rf var/dir/; rm -rf var/view_preprocessed/*; php bin/magento cache:flush && php bin/magento setup:upgrade && php bin/magento setup:di:compile && php bin/magento setup:static-content:deploy && php bin/magento setup:static-content:deploy de_DE && php bin/magento indexer:reindex && php bin/magento cache:enable
If errors change the above command to your needs.
Logging and Testing is key to reproduce your issues.
Contact your hosting and explain your issues, sometimes the solution is simple and they will help you out. I hope it will help you out.
@koopjesboom If you have never had rewrite issues, you either haven't been paying attention or you haven't been using Magento. The rewrite system in Magento needs to be entirely rebuilt and this time they need some experienced developers giving the whole system careful consideration.
Just look at some of the following issues, all of which are from a _clean_ install of Magento.
https://github.com/magento/magento2/issues/17583
https://github.com/magento/magento2/issues/17585
https://github.com/magento/magento2/issues/17614
https://github.com/magento/magento2/issues/17615
Extensions are not the issue, the issue is Magento itself. Magento 2 is just lipstick on the pig that was Magento 1, just look at the DBAL, utter garbage.
The only recommendation I can give to anyone is to avoid Magento at all costs, there is no need to subject oneself to the buggy, poorly architected mess that it is.
You can use this solution and you won't have any more problems with the URL rewrites.
https://webpanda-solutions.com/url-rewrites-regenerate-and-customize.html
Or alternatively, you could use these solutions:
I have used web panda extension it doesn't work for large product only good for 5 to 10 products. Magento should mix this problem asap or lose customers
It can process all products at once with the cli command
On Fri, 12 Jul 2019 at 11:24, mille2018 notifications@github.com wrote:
I have used web panda extension it doesn't work for large product only
good for 5 to 10 products. Magento should mix this problem asap or lose
customers—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/5863?email_source=notifications&email_token=ALZ4JLMUH2BLKHNUN6GEYOLP7A5TZA5CNFSM4CK4USMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZZCRTA#issuecomment-510798028,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALZ4JLILKJAYYMCGCF45DU3P7A5TZANCNFSM4CK4USMA
.
@caramidaovidiu
Normally i would say Earning money by a bug in a opensource platform should be avoided at all costs.
In case of magento, you almost need to use this because Magento team itself seems to be unable to resolve the problems.
@simonworkhouse
A little bit cynical but if i test things and i dont see a problem it is not there.
"If you have never had rewrite issues, you either haven't been paying attention or you haven't been using Magento."
I am using magento for 5 years now
Yes i agree Magento is a mess: "The only recommendation I can give to anyone is to avoid Magento at all costs, there is no need to subject oneself to the buggy, poorly architected mess that it is."
4."The rewrite system in Magento needs to be entirely rebuilt and this time they need some experienced developers giving the whole system careful consideration.:
Yes, They have to call some (real) experts and pay one of them a fortune to resolve these opensource issues. Everything is solved by then.
Without the money no one is considering helping a community anymore.
Who is willing to try and help a community out please feel free to analyze and dissect magento 2
The whole community would be thankful if someone repairs all the issues like URL rewrites and other well known problems in the latest final version. Also take a look on mobile devices because there are issues too.
If I had such a skill set i already did such an operation in my free time.
But unfortunately I am not skilled enough and i have not the time to learn.
I certainly have the feeling Adobe is going to pull the plug someday in the near future from the Opensource edition. Cost effective it is a pain in there ass. If they wanted it to be a success they had already intervened and did the necessary steps to get things done fast to Clean the name of Magento opensource and make it a success. Nothing points out this will ever happen.
So for now we have to deal with what we have because changing platform is expansive an too much time consuming (for me).
There are free extensions online that do the basic url regeneration. The webpanda one does more than that and the support is also very important. You won't get that with a free one and most of the people who have this kind of problem will need to support even with the extension working.
@magento-engcom-team why has this issue been closed?
same question :
@magento-engcom-team why has this issue been closed? !!!
This still occurs on Magento 2.3.2, I can actually sit there fetching the records from the url_rewrite table with MySQL Workbench and watch entries in the table vanish before my eyes, on a staging environment, with no transaction, imports or visits occurring at the time. Nothing is in the log files.
This could result in masses of products returning 404 errors from search results and decimate a websites SEO. 3 years of URL rewrite issues and Magento have still not got to grips with these type of occurrences.
@chrisbadley can also confirm this in 2.3.2 aswell!
@chrisbadley can also confirm this in 2.3.2 aswell!
Hi Simon, let me know if you have any extension that add things to categories automatically. I may have the solution for you.
@chrisbadley hey Chris :) Would love to know what you did to solve the problem!
@chrisbadley hey Chris :) Would love to know what you did to solve the problem!
Simon, List the extensions you have installed and I can tell you which one could potentially be causing the problem.
Hi @magento-engcom-team ,
Is it possible to have a REAL explanation about this bug ?
1/ Why do you stay this ticket marked as closed whereas bug is still here ?
2/ Are you currently working to solve this multisite problem ?
Thanks a lot to take in consideration
Hi @angelflo,
Unfortunately we still don't have exact steps to reproduce of this issue. Unfortunately this issue reproducing randomly and it's really hard to identify it.
If you have clear steps to reproduce - please report separate issue for that.
Thank you!
@chrisbadley these are our 3rd party extension in the composer.json:
"splendidinternet/mage2-locale-de-de": "^1.54",
"magepal/magento2-gmailsmtpapp": "^2.6.4",
"algolia/algoliasearch-magento-2": "^1.11.3",
"mirasvit/module-reports": "^1.3.29",
"elgentos/regenerate-catalog-urls": "^0.2.0",
"fooman/pdfcustomiser-m2": "^8.2.2",
"firebear/importexport": "^3.1.7",
"stripeofficial/stripe-payments": "^2.0.10",
"magepal/magento2-googletagmanager": "dev-master",
"semaio/magento2-configimportexport": "dev-develop",
"staempfli/magento2-module-seo": "^1.7",
"dhl/module-shipping-m2": "^0.10.1",
"mageplaza/module-delete-orders": "^1.2",
"trustedshops/trustedshops": "^1.0.4",
"xtento/productexport": "^2.10",
"xtento/customordernumber": "^2.1",
@chrisbadley these are our 3rd party extension in the composer.json:
"splendidinternet/mage2-locale-de-de": "^1.54", "magepal/magento2-gmailsmtpapp": "^2.6.4", "algolia/algoliasearch-magento-2": "^1.11.3", "mirasvit/module-reports": "^1.3.29", "elgentos/regenerate-catalog-urls": "^0.2.0", "fooman/pdfcustomiser-m2": "^8.2.2", "firebear/importexport": "^3.1.7", "stripeofficial/stripe-payments": "^2.0.10", "magepal/magento2-googletagmanager": "dev-master", "semaio/magento2-configimportexport": "dev-develop", "staempfli/magento2-module-seo": "^1.7", "dhl/module-shipping-m2": "^0.10.1", "mageplaza/module-delete-orders": "^1.2", "trustedshops/trustedshops": "^1.0.4", "xtento/productexport": "^2.10", "xtento/customordernumber": "^2.1",
Not really what I was hoping to see Simon, having said that, I would certainly start looking into the code for firebearstudio Import & Export, especially if you are running this via a cron.
My problem was an extension that automatically assigned products to a category based on attributes. I found this in a helper class:
foreach ($collection as $product) {
foreach ($product->getStoreIds() as $storeId) {
$this->urlPersist->deleteByData([
\Magento\UrlRewrite\Service\V1\Data\UrlRewrite::ENTITY_ID => $product->getId(),
\Magento\UrlRewrite\Service\V1\Data\UrlRewrite::ENTITY_TYPE => \Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator::ENTITY_TYPE,
\Magento\UrlRewrite\Service\V1\Data\UrlRewrite::REDIRECT_TYPE => 0,
\Magento\UrlRewrite\Service\V1\Data\UrlRewrite::STORE_ID => $storeId
]);
try {
$this->urlPersist->replace($this->productUrlRewriteGenerator->generate($product));
} catch (\Exception $e) {
}
}
}
Once I commented this out, the problem vanished.
I hope you find the resolution to your problem, good luck with your project, sorry I cannot be of more help.
@chrisbadley thanks so much for your insight!
I'll keep looking and update here if i find something!
Same Problem on 2.4.1
Most helpful comment
Or alternatively, you could use these solutions: