Skip to content
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

Autoroute - Batch update per Content Type #8485

Closed
lengockyquang opened this issue Feb 2, 2021 · 6 comments
Closed

Autoroute - Batch update per Content Type #8485

lengockyquang opened this issue Feb 2, 2021 · 6 comments

Comments

@lengockyquang
Copy link

lengockyquang commented Feb 2, 2021

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

image

@Skrypt
Copy link
Contributor

Skrypt commented Feb 2, 2021

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.

@lengockyquang
Copy link
Author

lengockyquang commented Feb 2, 2021

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

@Skrypt
Copy link
Contributor

Skrypt commented Feb 2, 2021

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".

@Skrypt Skrypt changed the title AutoRoute Part - Path of content items are not update after autoroute pattern changed Autoroute - Batch update per Content Type Feb 2, 2021
@deanmarcussen
Copy link
Member

We pretty much designed a feature for this last week -> refer #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

@lengockyquang
Copy link
Author

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.

@deanmarcussen
Copy link
Member

Duplicate #8316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants