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

Using the /{slug} override for pages breaks Bolt redirects #3082

Closed
Pinpickle opened this issue Mar 10, 2015 · 5 comments
Closed

Using the /{slug} override for pages breaks Bolt redirects #3082

Pinpickle opened this issue Mar 10, 2015 · 5 comments

Comments

@Pinpickle
Copy link
Contributor

I don't think this problem was here before, I've certainly never had it. I know that there has been a lot of work done on how routing functions so I think that's where this crops up.

Basically, if you make a /{slug} route, this overrides the system URLs that are required for Bolt to function. Going to /bolt will show a 404 error because the page isn't found - and it will attempt to do a redirect to /bolt/ (regardless of subdirectory, but that's another issue). That's not terrible, but nowhere near as nice as the automatic redirect I was getting with previous installs.

I know an easy solution is to change it to /{slug}/, as that will automate the redirect to to /bolt/, but I can't do that for this particular project due to another bug with menus not having current set properly if the routes have trailing slashes.

@CarsonF
Copy link
Member

CarsonF commented Mar 10, 2015

The UrlMatcher should handle trailing slashes...have you messed with that at all?

Are you saying you have a /{slug} route in routing.yml and that prevents you from going to the admin dashboard?

@Pinpickle
Copy link
Contributor Author

I haven't touched any code, no.

Having a /{slug} route prevents me from going to /bolt (note the lack of trailing slash) and being simply redirected to /bolt/, as it tries to find a page instead. There's some logic client side to determine that there should then be a redirect to /bolt/ but the process takes about 10 seconds.

/bolt/ on its own works fine

@CarsonF
Copy link
Member

CarsonF commented Mar 10, 2015

Oh I see I see. I cleaned up UrlMatcher a couple months ago. I'll have to go back and look.

@CarsonF
Copy link
Member

CarsonF commented Mar 10, 2015

I see part of the problem, this is one of the last usages of Library::simpleredirect. I think I've got a fix too.

@Pinpickle
Copy link
Contributor Author

Fixed by #3083, #3085

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

No branches or pull requests

2 participants