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.

Comment form not displaying

February 07, 2012 2:30pm

Subscribe [3]
  • #1 / Feb 07, 2012 2:30pm

    Jake @ HFC

    56 posts

    Hi Support… I’m seeing a few threads about the Comment form not appearing, and likewise, I’ve having no luck getting mine to work. Using EE 2.2.2, with the comment form code pasted from the documentation.

    {if member_group != '5'}
    <h3>Add A Comment</h3>
    <p>{exp:comment:form channel="zoo-visitor" entry_id="{segment_3}"}<br />
            <label for="comment">Comment:</label></p>
    
    <p>        <textarea name="comment" cols="70" rows="10" class="input">{comment}</textarea><br />
            <label><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information</label></p>
    
    <p>        <label><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</label></p>
    
    <p><br />
            <input type="submit" name="submit" value="Submit" /><br />
            <input type="submit" name="preview" value="Preview" /></p>
    
    <p>{/exp:comment:form}<br />
    {/if}

    Comment module is installed. The settings for this channel allow for comments. {segment_3} is the entry number, and entry is displaying fine directly above in the same template. The comment form is outside the channel display tags. I’ve tried using this code in a snippet as well as directly on the main template. I’ve tried removing the conditional statement enclosing the form. I’ve tried removing the parameters from the form code. Nothing has worked.

    What is going wrong here?

     

  • #2 / Feb 08, 2012 2:34pm

    Shane Eckert

    7174 posts

    Hello Jake,

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

    Is this a Single Entry Page?

    You are working with segment_3 which is correct. Can you hardcode the id just to test this? entry_id=”{segment_3}” would be entry_id=“X”.

    I am looking forward to your reply.

    Cheers,

  • #3 / Feb 08, 2012 11:33pm

    Jake @ HFC

    56 posts

    It is a single entry page. Sadly, hard-coding the entry_id and testing on that page didn’t do anything.  Hmmmm….

  • #4 / Feb 09, 2012 7:10am

    box-head

    177 posts

    Hello,

    Would it be possible to see the code that comes before the block you’ve posted. Often I find that if something isn’t displaying it’s because the code before it has an error (i.e. a missing curly bracket, or a div that hasn’t been closed etc).

    Is segment_3 a number or the the url_title?

  • #5 / Feb 12, 2012 1:13am

    Jake @ HFC

    56 posts

    So after a great deal of testing, a solution finally presented itself. 

    Instead of using

    entry_id="{segment_3}"
    with {segment_3} being a number, I changed the comment form parameter to
    url_title="{segment_3}"

    and changed my linking structure to reference the each entry’s url_title in the URL, not the entry_id. This has the form up and working, though I’m not exactly sure why I was having a problem using the entry_id.  Seems odd, but at least i have a working solution now.

  • #6 / Feb 13, 2012 12:00pm

    Shane Eckert

    7174 posts

    Hello Jake @ HFC,

    I am happy to see that you are back in business.

    I would like to see the whole template, I am very curious as to why it did not work for you before. Checked for bugs and there are none. Wondering if your linking structure before was setup correctly. If you would like me to troubleshoot this further, I am happy to.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases