afalls Posted August 28, 2022 Share Posted August 28, 2022 Can anyone explain to me why reCaptcha (v2 checkbox) works for the contact form and customer registration pages but won't work on the checkout page? It always get this message: The following errors were detected: The verification code was incorrect. Please try again." I have tried v2 both invisible and checkbox. You can complete an order if i disable reCaptcha. Cubecart version 6.4.7 Skin is Basix with CSS customisations (Not working with my previous skin - Foundation either) website is www.mplastics.com.au Thanks in advance Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 28, 2022 Share Posted August 28, 2022 Did the reCaptcha used to work for you with any prior CC64X version? Quote Link to comment Share on other sites More sharing options...
afalls Posted August 28, 2022 Author Share Posted August 28, 2022 I couldn't say as because up until 2 weeks ago i was using Cubecart in Catalogue Mode Only. Only just made the switch to take orders and didn't have a contact form previously. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 28, 2022 Share Posted August 28, 2022 Have you modified the Basix template "content.checkout.php" or any of the other templates used at this stage? I ask because looking at the source as revealed in my browser's Developer's Tools, I find the HTML that acts as the g-recaptcha area sits outside the one and only <form>...</form> block. Also not in the <form> block is the Additional Comments text entry field, and everything below it. So, let's double check how the sub-templates are placed in the main checkout template, specifically finding where the <form> tags are. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 28, 2022 Share Posted August 28, 2022 The Developers Tools are showing a location of the closing </form> tag in a different location than the raw source code (which is in the correct location). Still looking. Quote Link to comment Share on other sites More sharing options...
afalls Posted August 28, 2022 Author Share Posted August 28, 2022 No, in this skin i have only made cosmetic changes and moved some of the items around in the header. I did engage Cubecart support to do some things for me as i was on limited time to get the site live but they are firm that the issue lies with my hosting and my hosting said the fault is with cubecart. I am trying to exhaust all options as my client doesn't want to change hosting companies - and that is not a move i will make lightly. In light of what you have said i just checked out the demo for Foundation and Basix and it does look like its completely set up differently for basket and checkout stages. Could there be faults in the Basix template causing this? Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 28, 2022 Share Posted August 28, 2022 You say the reCaptcha at checkout doesn't work with Foundation either? Did you change anything about Foundation? Quote Link to comment Share on other sites More sharing options...
afalls Posted August 28, 2022 Author Share Posted August 28, 2022 Sorry i could have sworn it didn't work but i just changed to the Foundation skin i have installed but not edited and it worked so it must be realated to the Basix skin. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 28, 2022 Share Posted August 28, 2022 (edited) The only fault I have found so far is a mismatch in the hierarchy of the Billing Address area. <div class="panel-heading">Billing Address</div> <div class="panel-body"> <div class="row"> <div class=""> <dl>...</dl> <address> <dl>...</dl> <div id="address_form"> <dl>...</dl> <div class="row"> <dl class="col-xs-6">...</dl> <dl class="col-xs-6">...</dl> </div> <div class="row"> <dl class="col-xs-12 col-sm-6">...</dl> <dl class="col-xs-12 col-sm-6" id="state-list_wrapper">...</dl> </div> </address> </div> </div> </div> <div class="well well-sm"> <input type="checkbox" name="delivery_is_billing" id="delivery_is_billing" checked="checked"> <label for="delivery_is_billing">Deliver to billing address.</label> </div> </div> The </address> and the following </div> need to be swapped. Normally, the browser is sort of forgiving for situations like this. But experience has shown that an extra or missing <div> tag can cause all sorts of mysterious behavior. I have the source of the Basix skin template "content.checkout.confirm.php", near lines 282-283. These are the lines that get swapped. Whether that fixes reCaptcha, I do not know. After making the skin edit, you may need to clear CubeCart's internal cache. Edited August 28, 2022 by bsmither Quote Link to comment Share on other sites More sharing options...
afalls Posted August 28, 2022 Author Share Posted August 28, 2022 THANK YOU!!!! That fixed worked. The reCaptcha is now behaving exactly as it should and orders are going through. I am so very grateful for your assistance Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 28, 2022 Share Posted August 28, 2022 The Developer Tools interpretation of the source is now also correct. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.