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

Unable to find a matching sales channel for the request #137

Closed
Schrank opened this issue Sep 30, 2021 · 3 comments
Closed

Unable to find a matching sales channel for the request #137

Schrank opened this issue Sep 30, 2021 · 3 comments
Labels

Comments

@Schrank
Copy link
Contributor

Schrank commented Sep 30, 2021

Maybe this is already fixed, but just in case someone has the same problem...

We ran in an issue right after placing an order with Shopware 6.3.5.4 and Payone 2.3.1:

image

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

What happend?

For some reason the redirect url of payone is wrong:

https://example.com/payone/redirect?hash=ODQ1ODcxNDZiZjJiZTFjNDQ1NzI3Njc4ZjE4ZGMzNGFjYjA4OWQxNmRkZTkyZjEzMGJiNzZiNDJlMjQxYWI4ZA%3D%3D

but it should be

https://example.com/DE/payone/redirect?hash=ODQ1ODcxNDZiZjJiZTFjNDQ1NzI3Njc4ZjE4ZGMzNGFjYjA4OWQxNmRkZTkyZjEzMGJiNzZiNDJlMjQxYWI4ZA%3D%3D

This leads to an interesting bug, which ended in the above error - which is not a symfony error page and I was unable to find any log, neither php, apache, mysql, nothing. Took a while to find, hence this post, so someone might have a shorter way in the future.

Solution:

Add the url to the sales_channel as well: https://example.com/ without DE at the end.

TL;DR

Make sure the redirect url is correct, for some reason in our case one is chosen which is not attached to the sales_channel.

The 500 error can be reproduced by setting in \Shopware\Storefront\Framework\Routing\RequestTransformer::transform $salesChannel null

@stale
Copy link

stale bot commented Nov 29, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 29, 2021
@stale stale bot closed this as completed Dec 7, 2021
@matheusgontijo
Copy link

@Schrank, this persists on Shopware 6.6.1.1 when custom paths are added after the slash, like /en or /de...

@matheusgontijo
Copy link

@Schrank by the way, just created an issue on Shopware repository:

shopware/shopware#3685

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

No branches or pull requests

2 participants