-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Saving Product does not update URL rewrite in Magento 2.1.0 #5929
Comments
Hi @veloraven, Thank you for labeling this issue as a bug. Do you know if/when it will be escalated to "acknowledged" by developers? This bug, along with #5923 and #5942, is blocking a go-live. What's the usual workflow and timescale for the Magento team to address bugs? |
Confirmed on 2.0.8->2.1 upgrade. |
Rewrite bug Thanks for narrowing it down to 2.0.8->2.1 upgrade. Were you able to find the commit that broke it? URL suffix feature You can change the default ".html" URL suffix in Stores > Configuration > Catalog > Catalog > Search Engine Optimization. I usually set it to blank for nice clean URLs: |
@JacobDrummond I've looked at url_rewrite commits, just out of curiosity, and saw that there was a lot of activity on it not too long ago, alas I'm not a coder and thus useless inside Magento's guts. Thanks for the info on the URL thing. Didn't think to look under SEO for it! |
This bug is also present on a 2.1 fresh install. |
@JacobDrummond |
Yes, I updated "[product] > Search Engine Optimization > URL key" which saved the url_key attribute, but didn't update the url_rewrite table. This issue appears to be with Magento_CatalogUrlRewrite not Magento_Catalog. Are you trying to reproduce on a 2.1 fresh install, or on a 2.0.7->2.1 upgrade? So far the only reports are from people who upgraded. |
@JacobDrummond I tested this and the other bug you found on a fresh 2.1 composer install. This bug is present on fresh and upgrade, while the other is only present on an upgrade. |
@JacobDrummond Understandable. They're also pretty nasty, so I'm surprised more people aren't chiming in with #5929 |
To clarify, here's how you regenerate URLs on a site where url_rewrites has become out-of-sync with product entities: |
@JacobDrummond Nicely done. @andimov Does this keep the two bugs in your neck of the woods? |
@JacobDrummond @Cacasapo |
… Magento 2.1.0 with single-store mode #5929
… Magento 2.1.0 with single-store mode #5929
… Magento 2.1.0 with single-store mode #5929
Bugs - MAGETWO-56862 [Github] Saving Product does not update URL rewrite in Magento 2.1.0 with single-store mode #5929 - MAGETWO-55935 [Bundle product] Cannot configure bundle product in order editing(admin panel) - MAGETWO-55849 Customer can be deleted without Merchant permissions verification - MAGETWO-57118 [github#6201] Form key shared between admin and frontend - MAGETWO-57989 Unable to create custom image attribute in category - MAGETWO-55395 Custom address attribute not appearing on Checkout summary - MAGETWO-59240 There is no WHERE claus for retrieving Media Gallery Data
Hi @JacobDrummond. Thank you for your report. The fix will be available with the upcoming 2.3.1 release. |
I can confirm that saving a product now does update the URL rewrite correctly. However, if I edit the product and only if I change the URL manually to say test333, the URL rewrites gets eventually generated as expected. My site is in single-mode. Am I the only one to get this problem on new products created after the upgrade?? Many thanks, Luca |
I have run into a problem upgrading to 2.3.1, after doing so, there are random products where the page url will return a 404: catalog/product/view/id/998, some other products work. The broken URL gets fixed only if I go into management and save the product again. Is there any workaround to find all these broken paths and update them? |
Have you noticed that simple products are not affected, in my case only bundle and configurable products are affected. Also using 2.3.1. |
This does indeed look to be an issue with the data migration. @hostep's post helped me find the steps to "solve" the issue. Note: Be sure to run the below steps in a development/staging environment and thoroughly test all url's are working prior to running on a live environment. Take a backup of any database before following any of the steps below.
You should now be able to update url's for products via the CMS. If you already have url's in the CMS that you would like to apply then you can follow step 5.
Note: Be certain to add the --save-old-urls param otherwise redirects won't be created for the old urls Check your site, this should have updated all product ur's to those specified in the CMS. |
We are experiencing same problem after upgrade to 2.3.1 - store is in 'single store mode'. New products get catalog/product/view/id/9027/s/product_name/ instead of /product_name/. If we switch to multistore mode everything works as expected, but this is not an option. For now the only solution for administrators is:
|
Hi @engcom-Bravo. Thank you for working on this issue.
|
Great 💯 🥇 👍 |
About 3 years, so good luck |
Please check this link for a workaround. |
@sumitCueBlocks unfortunately your workaround doesn't work for me on 2.3.3. |
@twoatechguy This will work when you saved a new product or edit and save an existing one. I'm using this code on one of my site in Magento 2.3.3 and it is working fine for me. |
@sumitCueBlocks Thanks for following up, I created the module again and this time was successful in my tests on 2.3.3. |
I'm on Magento 2.3.4 and just uploaded my products from Magento 1 store and am facing this problem. No matter what I try, I'm still seeing the incorrect URL. Any suggestions? I have a multi-store and not sure if that is causing the issues as well |
@SewHappy58 Add url_key column in ur CSV, add unique URL for ur product (ex: name-sku) and then try to upload. |
Why not post it publicly? You would help many with this. Also 2.0 (and 2.1) is very old. |
If you get "Notice: Undefined offset: 32000 in /vendor/magento/module-catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml" when trying to update the attributes, then try this solution:
|
Preconditions
Steps to reproduce
Expected result
Actual result
The text was updated successfully, but these errors were encountered: