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

Renaming content type route 404 error #88

Open
hrvoje-grabusic opened this issue Aug 17, 2021 · 2 comments
Open

Renaming content type route 404 error #88

hrvoje-grabusic opened this issue Aug 17, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@hrvoje-grabusic
Copy link

Hi,

When renaming a ContentTypeRoute all pages that were created with that page type return 404.
The only way to fix it seems to be to delete the pages and recreate them.

I was confused by why i was getting empty pages after renaming the route.
I didn't expect the route to be saved in the database.

That should probably be documented.

Also maybe the the route should be updated when the page is saved or maybe an update all routes button in the settings.

@tidyui
Copy link
Member

tidyui commented Aug 17, 2021

As page & post types can have multiple routes available the selected route is always stored in the database, even if there’s only one available.

I’ll move this issue to the docs repo as it’s not a software issue.

Regards

@tidyui tidyui transferred this issue from PiranhaCMS/piranha.core Aug 17, 2021
@matthewyarlett
Copy link

Hi,

When renaming a ContentTypeRoute all pages that were created with that page type return 404. The only way to fix it seems to be to delete the pages and recreate them.

I was confused by why i was getting empty pages after renaming the route. I didn't expect the route to be saved in the database.

That should probably be documented.

Also maybe the the route should be updated when the page is saved or maybe an update all routes button in the settings.

I had this issue the other day. I'm sure there is a more elegant/recommended approach to fixing it, however I found updating the routes in the Piranha pages table fixed the problem.

UPDATE [dbo].[Piranha_Pages]
SET Route = '/new-route'
WHERE ROUTE = '/old-route'

@tidyui tidyui added the enhancement New feature or request label Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants