[Skip to main content](#vessel-content)

#   Checkout - shopping as a guest - problem with recaptcha

##

- **[brunensys](/forum/user/57500-brunensys "View brunensys's Profile")**
- [![brunensys's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57500-brunensys "View brunensys's Profile") Topic Author
- [ Offline](/forum/user/57500-brunensys)

Less More

- Posts: 9
- Thank you received: 1
-
-

7 years 8 months ago [\#305102](#305102) by [brunensys](/forum/user/57500-brunensys "View brunensys's Profile")  *[Checkout - shopping as a guest - problem with recaptcha](/forum/27-checkout/897187-checkout-shopping-as-a-guest-problem-with-recaptcha#305102 "Hello,  during the checkout when I am shopping as a guest user and I confirm email address the page with address information is displayed. At the top of the page is a button thanks to which I am able to change the email address I filled in before. But when I take this opportunity the previous swither should be displayed but there is a problem with recaptcha (recaptcha is not loaded) which cause that the rest of the javascript code is not executed (address page is still displayed).  Thanks for your help,  Martin")* was created by *[brunensys](/forum/user/57500-brunensys "View brunensys's Profile")*

Hello,

during the checkout when I am shopping as a guest user and I confirm email address the page with address information is displayed. At the top of the page is a button thanks to which I am able to change the email address I filled in before. But when I take this opportunity the previous swither should be displayed but there is a problem with recaptcha (recaptcha is not loaded) which cause that the rest of the javascript code is not executed (address page is still displayed).

Thanks for your help,

Martin  [ ![Snimekobrazovky2019-03-26v8.33.29.png](/forum/attachment/46441) ](/forum/attachment/46441 "...26v8.33.29.png")

- [ ![Snimekobrazovky2019-03-26v8.33.29.png](/forum/attachment/46441) ](/forum/attachment/46441 "...26v8.33.29.png") [ ](/forum/attachment/46441?download=1 "...26v8.33.29.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzE4Ny1jaGVja291dC1zaG9wcGluZy1hcy1hLWd1ZXN0LXByb2JsZW0td2l0aC1yZWNhcHRjaGE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

7 years 8 months ago [\#305120](#305120) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Checkout - shopping as a guest - problem with recaptcha](/forum/27-checkout/897187-checkout-shopping-as-a-guest-problem-with-recaptcha#305120 "Hello,  during the checkout when I am shopping as a guest user and I confirm email address the page with address information is displayed. At the top of the page is a button thanks to which I am able to change the email address I filled in before. But when I take this opportunity the previous swither should be displayed but there is a problem with recaptcha (recaptcha is not loaded) which cause that the rest of the javascript code is not executed (address page is still displayed).  Thanks for your help,  Martin")*

Hi,

Can you provide a link to the shop with precise instructions to reproduce the problem so that we can better understand the situation ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzE4Ny1jaGVja291dC1zaG9wcGluZy1hcy1hLWd1ZXN0LXByb2JsZW0td2l0aC1yZWNhcHRjaGE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brunensys](/forum/user/57500-brunensys "View brunensys's Profile")**
- [![brunensys's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57500-brunensys "View brunensys's Profile") Topic Author
- [ Offline](/forum/user/57500-brunensys)

Less More

- Posts: 9
- Thank you received: 1
-
-

7 years 8 months ago [\#305125](#305125) by [brunensys](/forum/user/57500-brunensys "View brunensys's Profile")  Replied by *[brunensys](/forum/user/57500-brunensys "View brunensys's Profile")* on topic *[Checkout - shopping as a guest - problem with recaptcha](/forum/27-checkout/897187-checkout-shopping-as-a-guest-problem-with-recaptcha#305125 "Hello,  during the checkout when I am shopping as a guest user and I confirm email address the page with address information is displayed. At the top of the page is a button thanks to which I am able to change the email address I filled in before. But when I take this opportunity the previous swither should be displayed but there is a problem with recaptcha (recaptcha is not loaded) which cause that the rest of the javascript code is not executed (address page is still displayed).  Thanks for your help,  Martin")*

Hi Nicolas,

sure I can. Test website is available This message contains confidential information

To reproduce the issue please do the following steps:

- add any goods into the basket
- move to the checkout
- move to the second step of the checkout called "přihlásit se"
- choose first option called "nákup bez registrace" which means "shopping as a guest"
- fill in email address and verify that you are not a robot
- at the page where you should fill in billing address click on the button called "změnit informace" which serves for reverse email address change
- at this moment is page broken because of the recaptcha

If you need more instructions let me know.

Martin

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzE4Ny1jaGVja291dC1zaG9wcGluZy1hcy1hLWd1ZXN0LXByb2JsZW0td2l0aC1yZWNhcHRjaGE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

7 years 8 months ago [\#305127](#305127) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Checkout - shopping as a guest - problem with recaptcha](/forum/27-checkout/897187-checkout-shopping-as-a-guest-problem-with-recaptcha#305127 "Hello,  during the checkout when I am shopping as a guest user and I confirm email address the page with address information is displayed. At the top of the page is a button thanks to which I am able to change the email address I filled in before. But when I take this opportunity the previous swither should be displayed but there is a problem with recaptcha (recaptcha is not loaded) which cause that the rest of the javascript code is not executed (address page is still displayed).  Thanks for your help,  Martin")*

Hi,

I see what you mean now.
Try removing the code: Code:

if($ajax) return ' &lt;div id="hika-recaptcha" class="hika-recaptcha"&gt;&lt;/div&gt; &lt;script type="text/javascript"&gt; grecaptcha.render(\'hika-recaptcha\', {\'sitekey\':\''.$pubkey.'\', \'theme\':\''.$theme.'\'}); &lt;/script&gt; ';

of the file plugins/system/recaptcha2/recaptcha2.php and try again, that should help for that case.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzE4Ny1jaGVja291dC1zaG9wcGluZy1hcy1hLWd1ZXN0LXByb2JsZW0td2l0aC1yZWNhcHRjaGE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brunensys](/forum/user/57500-brunensys "View brunensys's Profile")**
- [![brunensys's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57500-brunensys "View brunensys's Profile") Topic Author
- [ Offline](/forum/user/57500-brunensys)

Less More

- Posts: 9
- Thank you received: 1
-
-

7 years 8 months ago [\#305134](#305134) by [brunensys](/forum/user/57500-brunensys "View brunensys's Profile")  Replied by *[brunensys](/forum/user/57500-brunensys "View brunensys's Profile")* on topic *[Checkout - shopping as a guest - problem with recaptcha](/forum/27-checkout/897187-checkout-shopping-as-a-guest-problem-with-recaptcha#305134 "Hello,  during the checkout when I am shopping as a guest user and I confirm email address the page with address information is displayed. At the top of the page is a button thanks to which I am able to change the email address I filled in before. But when I take this opportunity the previous swither should be displayed but there is a problem with recaptcha (recaptcha is not loaded) which cause that the rest of the javascript code is not executed (address page is still displayed).  Thanks for your help,  Martin")*

Hi Nicolas,

this solves just executing the rest of the javascript code but recaptcha is still missing so the user can not verify itself and move to the next step.

Martin

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzE4Ny1jaGVja291dC1zaG9wcGluZy1hcy1hLWd1ZXN0LXByb2JsZW0td2l0aC1yZWNhcHRjaGE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

7 years 8 months ago [\#305144](#305144) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Checkout - shopping as a guest - problem with recaptcha](/forum/27-checkout/897187-checkout-shopping-as-a-guest-problem-with-recaptcha#305144 "Hello,  during the checkout when I am shopping as a guest user and I confirm email address the page with address information is displayed. At the top of the page is a button thanks to which I am able to change the email address I filled in before. But when I take this opportunity the previous swither should be displayed but there is a problem with recaptcha (recaptcha is not loaded) which cause that the rest of the javascript code is not executed (address page is still displayed).  Thanks for your help,  Martin")*

Hi,

I see what is the problem. Also change the code: Code:

return ' &lt;script type="text/javascript" src="https://www.google.com/recaptcha/api.js?onload=onloadCallbackHKRecaptcha&amp;render=explicit&amp;hl='.$locale.'" async defer&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt;var onloadCallbackHKRecaptcha = function() { window.hkCaptchaWidget = grecaptcha.render(\'hika-recaptcha\', '.$params.'); '.$js.'};&lt;/script&gt; &lt;div id="hika-recaptcha" class="hika-recaptcha"&gt;&lt;/div&gt;';

to: Code:

return ' &lt;script type="text/javascript"&gt; var onloadCallbackHKRecaptcha = function() { window.hkCaptchaWidget = grecaptcha.render(\'hika-recaptcha\', '.$params.'); '.$js.' }; var scriptTag = document.createElement(\'script\'); scriptTag.src = "https://www.google.com/recaptcha/api.js?onload=onloadCallbackHKRecaptcha&amp;render=explicit&amp;hl='.$locale.'"; scriptTag..defer = true; document.body.appendChild(scriptTag); &lt;/script&gt; &lt;div id="hika-recaptcha" class="hika-recaptcha"&gt;&lt;/div&gt;';

in that same file and it should work.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzE4Ny1jaGVja291dC1zaG9wcGluZy1hcy1hLWd1ZXN0LXByb2JsZW0td2l0aC1yZWNhcHRjaGE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brunensys](/forum/user/57500-brunensys "View brunensys's Profile")**
- [![brunensys's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57500-brunensys "View brunensys's Profile") Topic Author
- [ Offline](/forum/user/57500-brunensys)

Less More

- Posts: 9
- Thank you received: 1
-
-

7 years 8 months ago [\#305154](#305154) by [brunensys](/forum/user/57500-brunensys "View brunensys's Profile")  Replied by *[brunensys](/forum/user/57500-brunensys "View brunensys's Profile")* on topic *[Checkout - shopping as a guest - problem with recaptcha](/forum/27-checkout/897187-checkout-shopping-as-a-guest-problem-with-recaptcha#305154 "Hello,  during the checkout when I am shopping as a guest user and I confirm email address the page with address information is displayed. At the top of the page is a button thanks to which I am able to change the email address I filled in before. But when I take this opportunity the previous swither should be displayed but there is a problem with recaptcha (recaptcha is not loaded) which cause that the rest of the javascript code is not executed (address page is still displayed).  Thanks for your help,  Martin")*

Hi Nicolas,

I think you have a mistype in "scriptTag.defer = true;" - double dot. But even if I correct it, it does not work and recaptcha does not load at all because of: Error: Missing required parameters: sitekey

Martin

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzE4Ny1jaGVja291dC1zaG9wcGluZy1hcy1hLWd1ZXN0LXByb2JsZW0td2l0aC1yZWNhcHRjaGE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

7 years 8 months ago [\#305157](#305157) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Checkout - shopping as a guest - problem with recaptcha](/forum/27-checkout/897187-checkout-shopping-as-a-guest-problem-with-recaptcha#305157 "Hello,  during the checkout when I am shopping as a guest user and I confirm email address the page with address information is displayed. At the top of the page is a button thanks to which I am able to change the email address I filled in before. But when I take this opportunity the previous swither should be displayed but there is a problem with recaptcha (recaptcha is not loaded) which cause that the rest of the javascript code is not executed (address page is still displayed).  Thanks for your help,  Martin")*

Hi,

Sorry, I gave you the code for the next version of the recaptcha plugin which will support the "invisible" mode.
In your version of the plugin, you need to replace: Code:

'.$params.'

by: Code:

{\'sitekey\':\''.$pubkey.'\', \'theme\':\''.$theme.'\'}

The following user(s) said Thank You: [brunensys](/forum/user/57500-brunensys "View brunensys's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzE4Ny1jaGVja291dC1zaG9wcGluZy1hcy1hLWd1ZXN0LXByb2JsZW0td2l0aC1yZWNhcHRjaGE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brunensys](/forum/user/57500-brunensys "View brunensys's Profile")**
- [![brunensys's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57500-brunensys "View brunensys's Profile") Topic Author
- [ Offline](/forum/user/57500-brunensys)

Less More

- Posts: 9
- Thank you received: 1
-
-

7 years 8 months ago [\#305208](#305208) by [brunensys](/forum/user/57500-brunensys "View brunensys's Profile")  Replied by *[brunensys](/forum/user/57500-brunensys "View brunensys's Profile")* on topic *[Checkout - shopping as a guest - problem with recaptcha](/forum/27-checkout/897187-checkout-shopping-as-a-guest-problem-with-recaptcha#305208 "Hello,  during the checkout when I am shopping as a guest user and I confirm email address the page with address information is displayed. At the top of the page is a button thanks to which I am able to change the email address I filled in before. But when I take this opportunity the previous swither should be displayed but there is a problem with recaptcha (recaptcha is not loaded) which cause that the rest of the javascript code is not executed (address page is still displayed).  Thanks for your help,  Martin")*

Hi Nicolas,

yes, it seems to be working now, thank you for your help.

Martin

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzE4Ny1jaGVja291dC1zaG9wcGluZy1hcy1hLWd1ZXN0LXByb2JsZW0td2l0aC1yZWNhcHRjaGE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.063 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
