Captcha does not appear in contact page, so when I click submit button page posts back and nothing happens. I tried captcha and recaptcha either. Is there any solution for it?
Please check screenshot.
This is the contact page: https://www.robotekno.com/information/contact
Please check screenshot.
This is the contact page: https://www.robotekno.com/information/contact
In General
Share this post:
Responses (10)
-
Accepted Answer
Hi Breck,
Ok thank you.
Maybe you're right as you confirm it is working for the "Second" template contact.tpl.
In which case Taylan would just need to add the additional code:-
<?php if ($captcha) { ?>
<?php echo $captcha; ?>
<?php } ?>
And that this code in "Default" template contact.tpl
<?php if ($site_key) { ?>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"><?php echo $recaptcha; ?></div>
<?php if ($error_captcha) { ?>
<div class="text-danger"><?php echo $error_captcha; ?></div>
<?php } ?>
</div>
</div>
<?php } ?>
Is not being used?
What do you think would fix it for Taylan Rune?
Regards,
Hackasacka -
Accepted Answer
Google captcha is working on second theme.
https://store.valleybeekeeping.com/index.php/information/contact
Just wondering is $captcha used only for basic or does it not work for basic and Google? -
Accepted Answer
Hi Rune,
It looks like the code in the the link:-
https://github.com/arastta/arastta/blob/1.6.1/catalog/view/theme/second/template/information/contact.tpl#l138-l140
Confirms how to fix the "Basic" "captcha" for the contact.tpl in the "Default" template as explained in the above post.
Can you confirm whether the "Google" "recaptcha" is working in the "Default" contact.tpl as it appears to be missing from the "Second" template contact.tpl.
We do not have a valid Google key for our test domain yet.
This should also help Taylan who looks like they're using the "Default" template and "Google" "recaptcha" in his original post question.
Regards,
Hackasacka -
Accepted Answer
-
Accepted Answer
It's most likely a bug, a forgotten change in https://github.com/arastta/arastta/commit/83bb387ab3cb80dfa9934b7869c9497b325b4b8d
Look at the code in Second, and use it to fix Default:
https://github.com/arastta/arastta/blob/1.6.1/catalog/view/theme/second/template/information/contact.tpl#l138-l140 -
Accepted Answer
Hi Breck,
Here is the copy of the file from a download today for Arastta v1.6.1 for contact.tpl from the "default" template:-
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset>
<h3><?php echo $text_contact; ?></h3>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-name"><?php echo $entry_name; ?></label>
<div class="col-sm-10">
<input type="text" name="name" value="<?php echo $name; ?>" id="input-name" class="form-control" />
<?php if ($error_name) { ?>
<div class="text-danger"><?php echo $error_name; ?></div>
<?php } ?>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-email"><?php echo $entry_email; ?></label>
<div class="col-sm-10">
<input type="text" name="email" value="<?php echo $email; ?>" id="input-email" class="form-control" />
<?php if ($error_email) { ?>
<div class="text-danger"><?php echo $error_email; ?></div>
<?php } ?>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-enquiry"><?php echo $entry_enquiry; ?></label>
<div class="col-sm-10">
<textarea name="enquiry" rows="10" id="input-enquiry" class="form-control"><?php echo $enquiry; ?></textarea>
<?php if ($error_enquiry) { ?>
<div class="text-danger"><?php echo $error_enquiry; ?></div>
<?php } ?>
</div>
</div>
<?php if ($site_key) { ?>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div>
<?php if ($error_captcha) { ?>
<div class="text-danger"><?php echo $error_captcha; ?></div>
<?php } ?>
</div>
</div>
<?php } ?>
</fieldset>
<div class="buttons">
<div class="pull-right">
<input class="btn btn-primary" type="submit" value="<?php echo $button_submit; ?>" />
</div>
</div>
</form>
As you can see there is no code for the "basic" "captcha" therefor it cannot work. We assume you are referring to either using the "Google" "recaptcha" in the "Default" template or you are using the "Second" template for "basic" "captcha" as you can't be correct for both?
It sounds like you are referring to Google recaptcha as you mention the keys. We would probably need a Google recaptcha key for our domain to be able to compete the test.
If you look at the code and understand it you will see that not all the permutations of "captcha" with the basic or Google could work. We are not sure what is more complicated re-loading the whole web site and hoping it fixes itself or just looking at the specific issue?
We thought cutting and pasting:-
<?php if ($captcha) { ?>
<?php echo $captcha; ?>
<?php } ?>
<?php if ($site_key) { ?>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div>
<?php if ($error_captcha) { ?>
<div class="text-danger"><?php echo $error_captcha; ?></div>
<?php } ?>
</div>
</div>
<?php } ?>
Would be straight forward for some users, but not necessarily so easy for yourself.
Hope this helps. -
Accepted Answer
Sounds like a lot of work for something that should be working.
Works fine on our website.
Have you tried re uploading the website files?
I have had to do this on occasion as I have found many updates failed and likely corrupted some files.
Solved some of the issues we had in the past.
Verify your keys are valid and no extra spaces before and after the keys entered. -
Accepted Answer
Hi Taylan,
As the Arastta v1.6.1 Basic Captcha is enabled by default on a clean install and Google reCAPTCHA is disabled, but are not being shown on your form, a solution is to disable both.
It may or may not be relevant as to whether you have entered any site key or secret Google key. In version 1.5 you can't disable the Google reCAPTCHA with or without data in the Admin.
In Arastta v1.6.1 you can enable and disable Google reCAPTCHA by entering "12345678" as the keys in the Admin.
File at location public_html/catalog/view/theme/second/template/information/contact.tpl
In template "Second" using a conditional statement in the Arastta "contact.tpl" they do check for a variable $captcha but not $site_key:-
<?php if ($captcha) { ?>
<?php echo $captcha; ?>
<?php } ?>
They are not checking for the Google reCAPTCHA though in this template.
File at location public_html/catalog/view/theme/default/template/information/contact.tpl
In template "Default" using a conditional statement in the Arastta "contact.tpl" they do check for a variable $site_key but not $captcha :-
<?php if ($site_key) { ?>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div>
<?php if ($error_captcha) { ?>
<div class="text-danger"><?php echo $error_captcha; ?></div>
<?php } ?>
</div>
</div>
<?php } ?>
If you replace the above code with:-
<?php if ($captcha) { ?>
<?php echo $captcha; ?>
<?php } ?>
<?php if ($site_key) { ?>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div>
<?php if ($error_captcha) { ?>
<div class="text-danger"><?php echo $error_captcha; ?></div>
<?php } ?>
</div>
</div>
<?php } ?>
The Basic Captcha in the "Contact" form should now work.
The "Default" template has an additional folder in the view of the template
File loaction public_html/catalog/view/theme/default/template/captcha
This contains files "basic.tpl" and "goolge.tpl".
These do not appear to be being used here directly.
The entry for Goolge reCAPTCHA in the "Default" template looks like an empty div and variable $site_key is empty even after entering "12345678" in the Admin backend. It may be using a different variable that we haven't traced yet. :-
<div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div>
Do you have valid Google captcha keys we can use to test and have Arastta tested this with valid keys themselves?
Hope this helps.
P.S. When can you add a button to automatically "Import Menu" from existing Category data? We would rather import and delete than simply add one by one for data in some circumstances. -
Accepted Answer
Breck Demers wrote:
Have you enabled Google Captcha and entered the site and secret keys?
Yes I enabled Google Recapcha. I can use it in product comments tab. You can check it from there:
https://www.robotekno.com/arduino-uno-r3-yeni-versiyon-breadboard-jumper-usb-kablo
Also you can check attachment too. -
Accepted Answer
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »