Just updated a EE site from 2.2.2 to 2.5. Site previous didn’t have comments module installed.
Since updating to 2.5 I also installed the comments module as the site now has entries that allow comments.
I created a new channel called blod_post and set this channel to allow comments under edit preferences.
In my template I have the code below. When I view my template it seems all ok. When I fill in the fields and click submit I just get redirected back to template.
No comment field values missing errors if empty. If all fields are filled in I don’t get redirected to my thank you template.
No comments in the system either.
I have tried called the comments form tag outside of my channel entries tag and still no luck. Not sure what is wrong?
Please advise.
Sean
Here is my complete template:
{exp:channel:entries channel="blog_post" dynamic="yes"}
{embed='inc/.header' title='{title}' html_class="content-page"}
<div class="main-content cf">
<div class="left-col">
{if header_image}{header_image}{/if}
<div class="content-area cf">
{embed='inc/.left_sidebar'}
<div class="main-content-area single-post">
{entry_date format="%d%S %F %Y"}
<h1>{title}</h1>
by {author}{if comment_total > 0}, {comment_total} comments{/if}
{page_body}
{if comment_total > 0}
<h3>{comment_total} Comments</h3>
<p> {exp:comment:entries dynamic="yes" status="Open" orderby="date" sort="desc"}<br />
{comment}<br />
By {name} on {comment_date format="%d%S %F %Y"}<br />
{/exp:comment:entries} <br />
</p><h3>Post a comment</h3>
<p> {if:else} <br />
</p><h3>Be the first to comment</h3>
<p> {exp:comment:form entry_id="{entry_id}" channel="blog_post" return="/{segment_1}/{segment_2}/thanks-for-posting/"}<br />
<ul class="comments-form"><br />
{if logged_out}<br />
<li><label for="name">Name:</label><input type="text" name="name" value="{name}" size="50" /></li><br />
<li><label for="email">Email:</label><input type="text" name="email" value="{email}" size="50" /></li><br />
<li><label for="url">URL:</label><input type="text" name="url" value="{url}" size="50" /></li><br />
{/if}<br />
<li><label for="comment">Comment:</label><textarea name="comment" cols="70" rows="10">{comment}</textarea></li><br />
<li><label><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information</label></li><br />
<li><label><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</label></li><br />
</ul><br />
<input type="text" name="honeepot" value="" /><br />
<input type="submit" name="submit" value="Submit" /><br />
{/exp:comment:form}<br />
{/if}<br />
</div><br />
</div><br />
</div> <!-- end left-col --><br />
{embed='inc/.right_sidebar'}<br />
</div> <!-- end main-content --><br />
{embed='inc/.footer'}<br />
{/exp:channel:entries}