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

Error can not switch between stores #26

Open
divivu opened this issue Mar 11, 2021 · 2 comments
Open

Error can not switch between stores #26

divivu opened this issue Mar 11, 2021 · 2 comments

Comments

@divivu
Copy link

divivu commented Mar 11, 2021

error.log
Hi, Thank you for your module!
It help fixed the issue but I see an error when config "Same Site" is "None" and switch between stores.
"The store cannot be switched."
err

I'm using your module version 3.0.0 on magento 2.4.1.
Log file attached.
Thank you!

@vpsnak
Copy link

vpsnak commented Mar 29, 2021

Hey, i had this issue you can either find a way to override this class of directly edit it in vendor.

vendor/magento/module-store/Model/StoreSwitcher/ManagePrivateContent.php
Line 56
you need to setSecure(true) when using SameSite none

I DO NOT recommend edit it in vendor.

I am using Magento 2.4.1 and i was getting this error
[2021-03-29 19:12:28] main.CRITICAL: The store cannot be switched. {"report_id":"8cdac15d94123a3db6111cc3ddb29100d7fb1448eeefea0372b456045a1ab3ab","exception":"[object] (Magento\Store\Model\StoreSwitcher\CannotSwitchStoreException(code: 0): The store cannot be switched. at /home/fistikato/public_html/vendor/magento/module-store/Model/StoreSwitcher/ManagePrivateContent.php:64, InvalidArgumentException(code: 0): Cookie must be secure in order to use the SameSite None directive. at /home/fistikato/public_html/vendor/magento/framework/Stdlib/Cookie/CookieMetadata.php:165)"} []

@bsdnomad
Copy link
Contributor

#30

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

3 participants