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

Store switcher gives 404 when logged in #32706

Closed
Axel29 opened this issue Apr 9, 2021 · 7 comments
Closed

Store switcher gives 404 when logged in #32706

Axel29 opened this issue Apr 9, 2021 · 7 comments
Assignees
Labels
Component: Store Issue: needs update Additional information is require, waiting for response

Comments

@Axel29
Copy link

Axel29 commented Apr 9, 2021

Preconditions

  1. Magento 2.3.4
  2. PHP 7.2
  3. Varnish cache enabled (not tested without it)

Steps to reproduce

  1. Create at least 2 store views (let's say store A and store B)
  2. Create a customer account
  3. Create a category
  4. Change the URL key in the second store (store B)
  5. Log in with the customer account created in step 2
  6. Go to the category in frontend on store A
  7. Use the store switcher to go to the store B
  8. Use the store switcher to go back to store A

Expected result

  1. The user is redirected to the correct store
  2. The URL is correct

Actual result

  1. The user is redirected to the correct store
  2. The URL is incorrect (404) because the URL key of the category stays the same as the store B

Related issues

I've found the issue #24942 that has the same bug but described differently.
I've tried the fix mentioned in this comment #24942 (comment) and it seems to work perfectly, but according to the other comments bellow, it doesn't take into account the URL parameters and it still needs official fix as the same code is present in Magento 2.4.2 (https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Store/etc/di.xml).

@mrtuvn
Copy link
Contributor

mrtuvn commented Apr 11, 2021

Seem the fix already delivered to 2.3.6 or 2.4.2 (Official release) And also available in 2.4-develop branch git
Have you check your scenario again in latest code ? Or issue still reproducible in specific cases

@Axel29
Copy link
Author

Axel29 commented Apr 11, 2021

Seem the fix already delivered to 2.3.6 or 2.4.2 (Official release) And also available in 2.4-develop branch git
Have you check your scenario again in latest code ? Or issue still reproducible in specific cases

Hi, thanks for the answer, I didn't try it on a 2.3.6 or higher, do you have by any chance the fix for it?

Thanks!

@mrtuvn
Copy link
Contributor

mrtuvn commented Apr 11, 2021

https://support.magento.com/hc/en-us/articles/360049869051
Also while dive in some link i found this in comment
#23755 (comment)

@Axel29
Copy link
Author

Axel29 commented Apr 11, 2021

https://support.magento.com/hc/en-us/articles/360049869051
Also while dive in some link i found this in comment
#23755 (comment)

The MDVA-30107 patch doesn't seem to define the same issue. In this patch, the user gets redirected to the home page, which is not my case, but I'll try it tomorrow to be sure.

@engcom-Oscar
Copy link

Hi @Axel29 !
Can you please check and confirm that issue not valid against 2-4-develop code (I was not able to reproduce it on 2-4-develop branch)

@engcom-Oscar engcom-Oscar added the Issue: needs update Additional information is require, waiting for response label Apr 12, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Apr 12, 2021
@krishprakash krishprakash self-assigned this May 4, 2021
@m2-assistant
Copy link

m2-assistant bot commented May 4, 2021

Hi @krishprakash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@krishprakash
Copy link

Hi @Axel29. Feel free to reopen/comment the issue once you confirm the issue is reproduce on latest 2.4-develop instance
Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Store Issue: needs update Additional information is require, waiting for response
Projects
None yet
Development

No branches or pull requests

4 participants