-
Notifications
You must be signed in to change notification settings - Fork 76
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
Question: Regenerate everything #48
Comments
Unless you're running a very old Magento version (<=2.1), you don't need the path commands. See https://github.com/elgentos/regenerate-catalog-urls#whats-the-difference-between-url_key-and-url_path Otherwise, first keys, then paths, because;
But make sure you have removed the paths if they're there, because Magento still uses them when they're present. |
We are at 2.4.3 but I believe we have a lot of trash in the database from old version :-( |
Ah, we can remove the paths? like from the EAV table? |
Then I'd suggest cleaning up the database first. Garbage in is garbage out. |
@amenk yes, see the faq |
@peterjaap can you confirm, also the category's url_paths should be deleted? And on our staging where I deleted both, category's + product's url_path magento still seems to write them, but not all (after delete + rebuild I see 59 rows for
while before we had 5623 rows We did not spot other url problems though... |
@amenk: Magento always writes the The Hope this makes it a bit more clear. @peterjaap: maybe you should update the title |
@hostep so you're saying the |
Yes exactly. Code reference, hmm, this class sounds related probably: https://github.com/magento/magento2/blob/7996e89bc5420220eae5d8b755e6e0f839cbd94a/app/code/Magento/CatalogUrlRewrite/Model/CategoryUrlPathGenerator.php But the easiest way to tell is:
Also, don't forget that this very module has a command to regenerate url_path's for category's: |
The fact that that command is there doesn't say anything because the I updated the readme accordingly :) ed2ed37 |
Okay great, thanks! 🙂 |
For the record concerning my original question: This does not fix all URLs:
This does:
|
Exactly, always generate paths before url rewrites (for categories)! A month or so ago, I ran into a strange case when I needed to execute |
Oh wow, so I am not sure if the run-again fixed it in my case or the new order. |
In which order do I have to execute commands to regenerate everything?
Maybe we should add this to the readme?
The text was updated successfully, but these errors were encountered: