ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Comments not working

May 17, 2012 11:19am

Subscribe [2]
  • #1 / May 17, 2012 11:19am

    Sean Delaney

    64 posts

    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}

  • #2 / May 18, 2012 12:51pm

    Shane Eckert

    7174 posts

    Hello Sean,

    I am sorry to hear you are running into this problem.

    Can you take the form and put it in it’s own template to reduce things?

    Also, can you hard code the return=.

    Please let me know what the results are.

    Cheers,

  • #3 / May 21, 2012 2:59am

    Sean Delaney

    64 posts

    Hi Shane,

    I got it working. As soon as I added index.php back into the URL it worked fine.

  • #4 / May 22, 2012 4:44pm

    Shane Eckert

    7174 posts

    Hey Sean,

    Glad to hear it!

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases