magento2: Customer is logged in but showing 404 error in frontend.

Preconditions and environment

  • 2.3.x, 2.4.x CE and Adobe Commerce

Base64 - aHR0cDovL21hZ2VudG8yNDAubG9jYWwvY3VzdG9tZXIvYWNjb3VudC9sb2dpblBvc3Qv Decoded Base64 - http://magento240.local/customer/account/loginPost/

Steps to reproduce

  1. Go to frontend.
  2. Add /customer/account/loginPost/ in your magento url. ex-http://magento240.local/customer/account/loginPost/
  3. Now click on {*}S{*}ign In
  4. Give login id and password.

Expected result

It should generate referer url to Customer dashboard page when referer URL header contains /loginPost.

Actual result

It is not generating referrer url to customer dashboard page,It is showing 404 error page but customer is logged in.

Attached video: Untitled_ Jul 29, 2022 3_00 PM.webm

Additional information

No response

Release note

No response

Triage and priority

  • < > Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • < > Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • < > Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • < > Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • < > Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 28 (14 by maintainers)

Most upvoted comments

We faced a similar issue in our one of the commerce cloud websites and the Adobe support team is not ready to check this so I am also actively looking for a solution.

In our case, the referer URL is incorrectly generated, and due to that customer is not redirecting to the previous page after login.

The issue is the login referer URL miss %2C at the end of the URL. Correct URL: https://www.our_domain.com/en/customer/account/login/referer/aHR0cHM6Ly93d3cucGFjaWZpY3Ntb2tlLmNvbS9lbi8%2C%2C/

Wrong URL: https://www.our_domain.com/en/customer/account/login/referer/aHR0cHM6Ly93d3cucGFjaWZpY3Ntb2tlLmNvbS9lbi8%2C/

As you can see, the correct URL has %2C at the end, which is missing in the wrong URL. (Basically, correct URL has two %2C%2C but the wrong URL only has one)

If we manually add %2C at the end of the URL, then it works as expected.

Now we are not sure why %2C is missing from the URL.

And the best thing is if we cloned the commerce cloud website to local (with same code and DB) then we have not face any issue 😦

Thanks, Vish

Hi @pmonosolo & @ananth-iyer ,

Thanks for your contribution and collaboration.

Internal team is working on it ,we will come back soon with some result.

Thanks

Hi @engcom-Lima are there any updates?

✔️ Issue confirmed

Issue got reproduced in 2.4-develop branch.

Description: Customer is logged in but showing 404 error in the frontend. Pre-requisite: Fresh magento 2.4-develop should be installed.

Steps to reproduce:

  1. Go to frontend.
  2. Add /customer/account/loginPost/ in your magento url.
  3. Now click on sign In
  4. Give login id and password.

Expected result: It should generate referrer url to Customer dashboard page when referer URL header contains /loginPost.

Actual result: It is not generating referrer url to customer dashboard page,It is showing 404 error page but customer is logged in.

Screenshots: image