Closed lengockyquang closed 3 years ago
You need to republish these content items manually. It won't do it for you. You can manually select all these items in the Content Items lists and batch publish them. No custom feature for this. I think the procedure is fine enough.
A database migration will require a website restart or a refresh of the actual active routes registered. Maybe, this could be part of a more complex "Alias" module like we had in Orchard 1.
if i had hundreds of post so it kinda hard to manually refresh the path of all of them :) Hope we can do something with it in the future
I agree. But then, it's a batch update of AutorouteParts that is required here. And a filter on "Content Types" to allow updating each of the associated records. It's not given that someone will want to update all it's routes because removing a url can affect SEO on a website. So, generally, you use an Alias on the original route to keep an history on these. That's why this is something that should be "per usage".
We pretty much designed a feature for this last week -> refer https://github.com/OrchardCMS/OrchardCore/issues/8316
The design didn't include rebuilding patterns, but the implementation could also consider that as an option.
For the moment you will need to republish as @Skrypt has said
I end up by implement few lines of code to manually update the path of content items with pattern and then republish it by content manager.
I'm using Orchard Core RC 2. I've created a lot of content items (most of them are blog post,...) that using auto route part. But after i changed the pattern of auto generate path, the exist path of content items are not update with pattern changing.
To make it work, i have to go through every single content item to refresh the path and save manually to re-generated new path for it. Are there any options or feature that can bulk-update or auto changed auto route path after change pattern