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

Continue URL redirects to root URL if it doesn't include a trailing slash #6

Open
MMasey opened this issue Jun 17, 2024 · 7 comments
Open

Comments

@MMasey
Copy link

MMasey commented Jun 17, 2024

I'm not sure if this is a documentation issue or an actual bug, but if you have a Continue URL without a trailing slash, when the Payment Provider tried to redirect to the correct URL, it end up going to the root URL /.

My site is configured to remove trailing slashes, so I didn't include them in my configuration, but when adding them back in, it worked as expected. E.g.

  • /checkout/order-confirmation redirect to /
  • /checkout/order-confirmation/ redirects to /checkout/order-confirmation

If the trailing slash is a functional requirement, this should be explained in the docs and the property descriptions. Whilst the example urls in the description do include a trailing slash, it isn't obvious that they are required (if they are)

@mattbrailsford
Copy link
Contributor

I'm pretty sure these aren't required. Have you tried disabling your other rewrites to see if anything is conflicting?

@MMasey
Copy link
Author

MMasey commented Jun 17, 2024

Heyo, yeah turns out it was the redirects 😅 That being said, I'll put in a PR to the docs just to add a line for those fields saying that if you're taking the no trailing slash approach they still need to be present.

@MMasey
Copy link
Author

MMasey commented Jun 17, 2024

Docs PR for reference - umbraco/UmbracoDocs#6197

It likely needs a bit of tweaking

@mattbrailsford
Copy link
Contributor

I don't understand what causes the redirect to '/' though? UC should just be redirecting to whatever URL is provided so what is causing the redirect to be ignored?

@MMasey
Copy link
Author

MMasey commented Jun 19, 2024

Yeah I don't know why it's happening either. I'll need to find sometime to pull down the repo and properly debug it. Maybe it's got something to do with routing?

@mattbrailsford
Copy link
Contributor

If you completely disable URL rewriting rules, does this continue to be the issue? I'm just surprised that hasn't been picked up before 🤔

@MMasey
Copy link
Author

MMasey commented Jun 19, 2024

I think I need to find some time to set up a clean install and see if I can replicate the issue that way. It does feel really odd though that it works when the redirect is in place and I include the trailing slash. It's almost as if somewhere in the pipeline, it's doing an exact string comparison when searching for the url, and if it can't find it, it then redirects to / instead. That is purely a guess through based on how it's behaving.

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