1

お問い合わせフォームが機能しなくなりました。何が問題なのかわかりません。他の電子メールが正しく機能していることを確認できます。奇妙な点は、送信をクリックすると、戻ってきてhttp://mydomain.com/contact/index/メッセージがないことです。また、 、テスト メッセージがスパムのように見える場合、Akismetは Akimet セクションでそれをキャッチします。

フォームのあるページ:

{{block type="core/template" name="contactForm" form_action="/contacts/index/post/" template="contacts/form.phtml"}}

form.htmlコード:

<form action="<?php echo $this->getFormAction();?>" id="contactForm" method="post">
<div class="fieldset">
    <h2 class="legend"><?php echo Mage::helper('contacts')->__('Contact Information') ?></h2>
    <ul class="form-list">
        <li class="fields">
            <div class="field">
                <label for="name" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Name') ?></label>
                <div class="input-box">
                    <input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" />
                </div>
            </div>
            <div class="field">
                <label for="email" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Email') ?></label>
                <div class="input-box">
                    <input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="text" />
                </div>
            </div>
        </li>
        <li>
            <label for="telephone"><?php echo Mage::helper('contacts')->__('Telephone') ?></label>
            <div class="input-box">
                <input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" type="text" />
            </div>
        </li>
        <li class="wide">
            <label for="reason" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Reason') ?></label>
            <div class="input-box">
                <textarea name="reason" id="reason" title="<?php echo Mage::helper('contacts')->__('Reason') ?>" class="required-entry input-text" cols="5" rows="3"></textarea>
            </div>
        </li>
    </ul>
</div>
<div class="buttons-set">
    <p class="required"><?php echo Mage::helper('contacts')->__('* Required Fields') ?></p>
    <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
    <button type="submit" title="<?php echo Mage::helper('contacts')->__('Submit') ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></span></button>
</div>
</form>
<script type="text/javascript">
//<![CDATA[
var contactForm = new VarienForm('contactForm', true);
//]]>
</script>

system.log の内容は次のとおりです。

2012-08-10T18:21:51+00:00 ERR (3): Notice: Undefined index: comment  in /var/www/html/svn/magento/website/trunk/app/code/community/Centerax/Akismet/Model/Api.php on line 56
2012-08-10T18:21:51+00:00 ERR (3): Notice: Undefined index: comment  in /var/www/html/svn/magento/website/trunk/app/code/community/Centerax/Akismet/controllers/Contacts/IndexController.php on line 52
4

1 に答える 1

0

直りました。上記のコードでわかるように、ある時点で、「コメント」のデフォルト フィールドを「理由」に変更しました。スパムをチェックするための「コメント」が見つからなかったため、Akismet はエラーをスローしていました。とにかくみんなありがとう。

于 2012-08-10T18:40:40.787 に答える