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

Customer account link broken after crawl #20255

Closed
monotheist opened this issue Jan 13, 2019 · 27 comments
Closed

Customer account link broken after crawl #20255

monotheist opened this issue Jan 13, 2019 · 27 comments
Labels
Area: Frontend Component: Customer Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: done Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. stale issue

Comments

@monotheist
Copy link

monotheist commented Jan 13, 2019

Preconditions (*)

  1. Magento 2.3 with cache and FPC enabled

Steps to reproduce (*)

  1. Run site check in woorank.com like below.
  2. https://www.woorank.com/en/www/pr-20241.instances.magento-community.engineering

Expected result (*)

  1. Below link should not throw 404 page not found
  2. https://pr-20241.instances.magento-community.engineering/customer/account/create/

Actual result (*)

  1. https://pr-20241.instances.magento-community.engineering/customer/account/create/
  2. Above link is broken. See screenshot below
    screenshot 2019-01-13 at 4 27 52 pm
@magento-engcom-team
Copy link
Contributor

Hi @ethniccode. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.

@ethniccode do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jan 13, 2019
@monotheist
Copy link
Author

@magento-engcom-team give me 2.3 instance

@shikhamis11 shikhamis11 self-assigned this Jan 13, 2019
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Jan 13, 2019

Hi @shikhamis11. 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.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

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

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

@shikhamis11
Copy link
Member

@magento-engcom-team give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @shikhamis11. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @shikhamis11, here is your Magento instance.
Admin access: https://i-20255-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@shikhamis11 shikhamis11 added Component: Customer Area: Frontend Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 13, 2019
@magento-engcom-team
Copy link
Contributor

@shikhamis11 Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-97606 were created

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jan 13, 2019
@shikhamis11
Copy link
Member

@ethniccode I did the same you explained and it actually showing 404 on account creation page.
screenshot from 2019-01-13 17-21-03

@monotheist
Copy link
Author

monotheist commented Jan 13, 2019

@shikhamis11 This issue appears on my production system overnight when Google crawls. I was struggling to reproduce this issue. Looks like any crawler can be used to reproduce this issue. Not only account create page, but also home page breaks. You can temporarily overcome the issue by disabling FPC

@shikhamis11
Copy link
Member

okay let me check if it is also there in magento 2.2 versions

@shikhamis11
Copy link
Member

@magento-engcom-team give me 2.2-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @shikhamis11. Thank you for your request. I'm working on Magento 2.2-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @shikhamis11, here is your Magento instance.
Admin access: https://i-20255-2-2-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@monotheist
Copy link
Author

@shikhamis11 No this is not there till 2.2.6. I am facing this issue only after I upgraded from 2.2.6 to 2.3

@shikhamis11
Copy link
Member

@ethniccode yes this issue is not in 2.2 versions

@shikhamis11 shikhamis11 removed their assignment Jan 13, 2019
@monotheist
Copy link
Author

@magento-engcom-team Is there a plan to fix this issue. If yes, in which release please?

@monotheist

This comment has been minimized.

@monotheist

This comment has been minimized.

@monotheist

This comment has been minimized.

@monotheist

This comment has been minimized.

@orlangur
Copy link
Contributor

@ethniccode could you please not spam everybody? For discussions you may join #github channel in Magento Slack.

@monotheist
Copy link
Author

@orlangur This is not spam. I am looking for answer to my question. If Magento is encouraging the user community to report bugs then they should take responsibility to answer promptly?

@monotheist
Copy link
Author

@mage2pratik @verklov @Alex-Lunkov @rogyar @dmytro-ch @ronak2ram @hitarthpattani Sorry to bother you. I wanted to check if you could shed some light on this issue. Isn't this issue affecting all merchants who are using magento 2.3? I was wondering if there is a temporary fix or workaround?

@DanielRuf
Copy link
Contributor

Please reread #20255 (comment)

@xantek-imc
Copy link

xantek-imc commented Apr 1, 2019

As a workaround try updating the .htaccess file to add the HTTP HEAD block below the already existing TRACE and TRACK block. Then flush the cache and 404 should not return.

############################################
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks

RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]

############################################
## HEAD HTTP methods disabled due to https://github.com/magento/magento2/issues/20255

RewriteCond %{REQUEST_METHOD} HEAD
RewriteRule .* - [L,R=405]

Testing this issue I found the following in my access log:
"HEAD /customer/account/create/ HTTP/1.1" 404 3708 "-" "Mozilla/5.0 (compatible; woorankreview/2.0; +https://www.woorank.com/)"

This got me thinking the HTTP HEAD request was causing the 404 to get stuck in the FPC for the requested URI. To prove this open a page on a Magento 2.3 site, open browser developer tools, and make a HEAD request by pasting the following into the Javascript Console:

var xmlhttp = new XMLHttpRequest();
  xmlhttp.open("HEAD", "/customer/account/create/", true); 
  xmlhttp.onreadystatechange=function() {
      if(xmlhttp.readyState==4) { 
         console.log(xmlhttp.getAllResponseHeaders());
      }
  }
  xmlhttp.send(null);

Which returns: HEAD https://{site.testing.domain}/customer/account/create/ 404 (Not Found)

Now the customer account creation page return 404 and the FPC cache needs to be flushed to clear.

Based on the above finds I took the quick route of blocking all HEAD request using the existing .htaccess. Obviously, NGINX would require config addition. I've read about the potential traffic drawbacks of rejecting all HEAD request so I imagine a more graceful/targeted workaround could be developed.

Credit for detailing how to make HEAD requests in a browser: https://www.laurencegellert.com/2013/03/using-your-browser-as-a-dev-tool-to-test-head-requests/

Edit: example NGINX config addition

## HEAD HTTP methods disabled due to https://github.com/magento/magento2/issues/20255
if ( $request_method = HEAD ) {
   return 405;
}

@magento-engcom-team magento-engcom-team added this to Ready for Dev in Community Backlog Mar 24, 2020
@sidolov sidolov added this to Ready for Grooming in Low Priority Backlog Sep 3, 2020
@sidolov sidolov added this to Ready for Development in Low Priority Backlog Sep 24, 2020
@ghost ghost removed this from Ready for Dev in Community Backlog Oct 20, 2020
@ghost ghost removed this from Ready for Development in Low Priority Backlog Oct 20, 2020
@ghost ghost removed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Oct 20, 2020
@magento-engcom-team magento-engcom-team added Priority: P3 May be fixed according to the position in the backlog. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Nov 30, 2020
@m2-community-project m2-community-project bot added this to Ready for Development in Low Priority Backlog Nov 30, 2020
@stale
Copy link

stale bot commented Feb 15, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

@stale stale bot added the stale issue label Feb 15, 2021
@stale stale bot closed this as completed Mar 1, 2021
@m2-community-project m2-community-project bot moved this from Ready for Development to Done in Low Priority Backlog Mar 1, 2021
@magento-engcom-team
Copy link
Contributor

Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily.

Please feel free to comment or reopen according to the Issue reporting guidelines
the ticket if you are still facing this issue on the latest 2.x-develop branch. Thank you for collaboration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Component: Customer Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: done Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. stale issue
Projects
Development

No branches or pull requests

7 participants