Hi. What could be wrong in this Contact form (basic theme) here is the log of errors:
2019-11-03 13:38:19 - PHP Notice: Undefined variable: top in /home/XXX/XXX/catalog/view/theme/default/template/information/contact.tpl on line 2
2019-11-03 13:38:19 - PHP Notice: Undefined variable: bottom_a in /home/XXX/XXX/catalog/view/theme/default/template/information/contact.tpl on line 151
2019-11-03 13:38:19 - PHP Notice: Undefined variable: bottom_b in /home/XXX/XXX/catalog/view/theme/default/template/information/contact.tpl on line 158
2019-11-03 13:38:19 - PHP Notice: Undefined variable: bottom_c in /home/XXX/XXX/catalog/view/theme/default/template/information/contact.tpl on line 165

Yes it works that way customers can write and capctha (basic) works just fine, but customer email/message never come to our email. Only get those errors always.
Any idea how to fix it...i read about someone has similar problem and he start to use second theme which didnt have anyproblems with contact form...i dont like that second theme gfx, i prefer this basic theme. So can someone help me out with this? Thanks.
Sunday, November 03 2019, 04:46 PM
Share this post:
Responses (3)
  • Accepted Answer

    Monday, November 04 2019, 04:34 PM - #Permalink
    First of you could turn of the 'Display Errors', you clearly don't need those, as those you posted is just notices and not related to your problem at all.

    Turning of the 'Display Errors' is anyway recommended for a live site, and might even help getting your site work better, so test having it disabled. Use only file log (Log Errors) if you need to debug anything.

    Look at: https://arastta.org/docs/user-manual/tools/error-logs

    When it comes to your problem, it can be anything. Your setup, server, mail limits, miss-configuration whatever. So you need to provide a lot more information, or ask your hosting company to check the mail logs, to see why it's not being sent.

    And, if you read anything, include the full info and link for reference.

    Anyhow, test with 'Display Errors: Off' first.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 05 2019, 07:29 AM - #Permalink
    Hi.
    Display errors is "off" as default. Error logs are on. Email works when someone orders something, it will send receipt just normal, but this contact form aint send nothing tho. Also email reports (server side) dont show nothing errors. But contact form works for some reason with that "second" theme, but like i said that i dont like that second theme, i more like default as it more cleaner (blue&white).
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 05 2019, 12:00 PM - #Permalink
    If the problem is only in the Default template, while Second works also for you, it would be natural to compare the code in those using a diff tool like t.ex. Meld.

    If you do, you'll notice there is a difference in the captcha code, that most likely is the cause of your problems. Copy the code from Second to see if it fixes your issue.

    Look at the documentation to understand the system structure and functionality, and where to look for the files to compare and fix. Start with this link, and the section 'Understanding themes' (plus all related docs): https://arastta.org/docs/developers/quick-start

    Anyway the path is catalog/view/theme/THEMENAME/template/information/contact.tpl

    Replace:
                        <?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>


    With:
                        <?php if ($captcha) { ?>
    <?php echo $captcha; ?>


    Denis most likely simply forgot to update this file in his pull her: https://github.com/arastta/arastta/pull/610

    PS! I recommend you lower the PHP Error Reporting to only include errors, and not notices: https://www.php.net/manual/en/function.error-reporting.php
    The reply is currently minimized Show
Your Reply