I have a comment form that is not functioning properly.
When I try to submit a comment, nothing gets saved to the database, and instead of retuning me to the specified return URL it returns me to the same single entry page with the comment form. No error is given and no other indication that anything is wrong.
Other forms on the site like Freeform contact form works fine. Just the comment form is not working.
The weblog and entry I’m testing on both have comments enabled.
Here’s is my template code:
{exp:comment:form channel="blog" preview="blog/comment" form_class="default" return="{homepage}blog/comment-thanks"}
<fieldset>
<ul class="formRow">
{if logged_out}
<li class="third">
<label>Name <span class="req">*</span></label>
<input type="text" name="name" value="{name}">
</li>
<li class="third">
<label>Email <span class="req">*</span></label>
<input type="text" name="email" value="{email}">
</li>
<li class="divider">.</li>
{/if}
<li class="wide">
<label>Comment <span class="req">*</span></label>
<textarea name="comment">{comment}</textarea>
</li>
{if captcha}
<li class="divider">.</li>
<li class="wide">
<label>{captcha} <span class="req">*</span></label>
<input type="text" name="captcha">
</li>
{/if}
<li class="divider">.</li>
<li class="buttons">
<a href="#%22class=%22btn" class="btn submit arrow">Submit Comment</a>
</li>
</ul>
</fieldset>
{/exp:comment:form}I’ve read in other places that forcing trailing slashes on URLs or removing “www” from URLs can cause problems with form submissions. I am using .htaccess to remove index.php but I am not removing “www” nor am I forcing trailing slashes. And as said above other form submissions are working fine, just not comment form.
With no error message it’s becoming very difficult for me to tell why else it wouldn’t work.
Any ideas? How can I debug this?