security-package icon indicating copy to clipboard operation
security-package copied to clipboard

reCaptcha is added multiple times to head

Open sankalpshekhar opened this issue 6 years ago • 16 comments

The link to recaptchs js is added several times to head, which slightly delays the loading time of the captcha on required pages.

Preconditions

  1. Magento 2.3.2 vanilla install with sample data
  2. Google reCaptcha v2 keys created on google

Steps to reproduce

Expected result

  1. Recaptcha should only be loaded once.

Actual result

image

sankalpshekhar avatar Sep 10 '19 20:09 sankalpshekhar

Also it is loaded (twice) on every page so also on pages where you would not expect it to be nessecary f.e. on homepage or category page.

Rickertje avatar Nov 29 '19 16:11 Rickertje

same here; magento 2.3.3

Lain818 avatar Jan 29 '20 11:01 Lain818

Same problem here : 2.3.2

fmineo avatar Mar 24 '20 11:03 fmineo

Should be fixed in https://github.com/magento/security-package/issues/21

naydav avatar Apr 07 '20 03:04 naydav

https://github.com/magento/security-package/pull/191

naydav avatar Apr 08 '20 09:04 naydav

Don't see this issue fixed on the latest release of Magento 2. It's still loading multiple instances of recaptcha__en.js

enyceedanny avatar Feb 20 '21 18:02 enyceedanny

Issue still exists on Magento 2.3.7-p1

@naydav - you mentioned this was fixed on 8th April 2020 ?

hewgim avatar Aug 28 '21 23:08 hewgim

This issue still exists in 2.4.2-p2 EE

cdcrothers avatar Oct 06 '22 16:10 cdcrothers

This issue is still present in Magento ver. 2.4.5, loading up to four times, increasing the payload of the website by about 1.4Mb Screenshot 2023-05-31 at 12 59 29 PM

aodreman avatar May 31 '23 17:05 aodreman

@nathanjosiah please can you reopen this so it can be investigated.

fredden avatar May 31 '23 21:05 fredden

@naydav Any update on this issue? Its still happening on Magento version 2.4.1 onwards all the latest versions.

sanganinamrata avatar Jun 19 '23 08:06 sanganinamrata

I have a bit different issue recaptcha lang script is being loaded multiple times. magento version 2.4.6. added manually recaptcha to our custom newsletter form. Schermafbeelding 2023-06-23 om 15 44 18

Naberdz avatar Jun 23 '23 13:06 Naberdz

This issue is existing in Adobe Commerce 2.4.5.P2 as well.

image

bharanii95dev avatar Jul 25 '23 08:07 bharanii95dev

Why is this closed? It looks like the issue is still there in 2.4.6-p1.

waldok avatar Aug 21 '23 12:08 waldok

@nathanjosiah please can you reopen this so it can be investigated.

fredden avatar Aug 21 '23 13:08 fredden

I'm not sure if I'm getting it right but it looks like this is all coming from Google script? 2023-12-08_10-03 2023-12-08_10-04 2023-12-08_10-05 2023-12-08_10-06 2023-12-08_10-06_1 2023-12-08_10-07

So it looks like from my limited knowledge that Google APIs as cascading the calls to the same script more than 1 time. Does that make sense? And how to resolve it? Is that only google? As per first image, it looks like Magento is already loading it just ONE time and Google is adding it multiple times.

andrewdaluz avatar Dec 08 '23 13:12 andrewdaluz