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 forms not appearing with code

March 09, 2011 6:03pm

Subscribe [5]
  • #1 / Mar 09, 2011 6:03pm

    finfinwabbit

    11 posts

    Hi,

    I am trying to implement a comment form to the blog section of a website I’m working on.  This is the code I currently have, and when I view the page nothing appears.

    {exp:comment:form}
    <label for="name">Name</label>
    
      <input type="text" name="name" value="{name}" id="name" size="37" /></p>
      <label for="email">Email Address</label>
    
    <input type="text" name="email" value="{email}" id="email" size="37" /></p>
      <label for="comment">Comment</label>
     
    <textarea name="comment" rows="8" cols="35" id="comment">{comment}</textarea></p>
    
    {/exp:comment:form}

    Am I missing a link to the ‘blog’ channel? If so, where might I be able to put that

    Thanks in advance

  • #2 / Mar 09, 2011 10:50pm

    kellypacker

    138 posts

    Is this code inside or outside the channel entries tag? It should be outside.

    Also it’s a good idea to include the channel=“blog” parameter in the tag:

    {exp:comment:form channel="blog"}

  • #3 / Mar 10, 2011 9:19am

    Sue Crocker

    26054 posts

    Thanks for the assist, kelly.

    finfinwabbit - also make sure that when you call the template, you are passing a url_title to the url.

    Example:

    http://example.com/index.php/site/comments/some-entry-title

    Does that help?

  • #4 / Apr 01, 2011 3:34pm

    JohnGribben

    111 posts

    Hello,

    I am having the same problem.

    I am using:

    EE Freelancer v2.1.3
    Build 20101220

    Structure 2.2.4
    Freeform 3.0.6

    The Comment module is installed and activated.  “Allow comments in this channel” is selected.

    The code for my form is:

    {exp:comment:form channel="events-blog"}
    {!-- form stuff --}
    {/exp:comment:form}

    This form should appear on single-entry pages accessed through URLs with the url_title at the end.

    I copied this code from a site I made recently in 2.1.0 wherein it is working fine.

    Thanks!
    John

  • #5 / Apr 01, 2011 4:08pm

    Sue Crocker

    26054 posts

    Hi, John. Do you have an example URL? If you put in something like this to the template, what shows up?

    This is segment_3 {segment_3}
    
  • #6 / Apr 01, 2011 4:34pm

    levlane

    32 posts

    Hi Sue,

    Thanks for getting back to me so fast.

    The line you sent does work, as you can see here:

    http://ubuntu.pedrera.com/sites/nolanpainting/index.php/community/recent-events/giving-back-to-the-community-nolan-painting-paints-kensington-mural

    The comments form (and entries list) should appear beneath the post details there.

    Could it be because I have the form placed in a snippet?

    Thanks again!
    John

  • #7 / Apr 01, 2011 4:41pm

    JohnGribben

    111 posts

    Yikes!

    Sue, that last post was from me, John.  I was using a different computer when I replied.

  • #8 / Apr 01, 2011 5:01pm

    Sue Crocker

    26054 posts

    John, try removing the snippet and use just the code in the snippet. Does that work? Try adding Debug: {segment_3} inside the snippet an see if it sees that.

  • #9 / Apr 07, 2011 10:44am

    JohnGribben

    111 posts

    Hi Sue,

    Thanks for your reply.  Sorry for the delay in mine; I got pulled off this project for a few days.

    I tried removing the form code from the snippet (leaving the debug code there), and still no form appears:

    http://ubuntu.pedrera.com/sites/nolanpainting/index.php/community/recent-events/nolan-painting-celebrates-1st-fridays-on-the-main-line

    As you can see, the debug text does appear.

    Thanks,
    John

  • #10 / Apr 07, 2011 10:54am

    JohnGribben

    111 posts

    Hey Sue, I think I found the problem!  I needed to pass the url_title parameter to the comment tags.  I thought I had tried that (but maybe not 😖 )

    Thanks again for your help!  I think this case is closed.

  • #11 / Apr 07, 2011 1:20pm

    Lisa Wess

    20502 posts

    Hi, John -

    You shouldn’t need to pass the URL title over so long as it’s in the URL.  Can you show us your final solution? It may be that we should investigate further.

    Or if you’re happy with how it’s working, then it’s up to you if you want to keep troubleshooting. =)

  • #12 / Apr 11, 2011 12:23pm

    JohnGribben

    111 posts

    Hi Lisa,

    It would be good to do this without passing the URL title.  Here is what is working currently:

    {exp:comment:entries channel="events-blog" url_title="{segment_3}"}
    {!-- comments list --}
    {/exp:comment:entries}
    
    {exp:comment:form channel="events-blog" url_title="{segment_3}"}
    {!-- comments form --}
    {/exp:comment:form}

    Here is the page:

    http://ubuntu.pedrera.com/sites/nolanpainting/index.php/community/recent-events/nolan-painting-celebrates-1st-fridays-on-the-main-line

    This is the original setup wherein the comment tags are contained in a snippet.  I have tried this without using a snippet, and I get the same problem.

    Is it necessary to set the “dynamic” parameter to “off?”  This worked for the comment entries tag but not for the comment form tag.  Could this problem be caused by a conflict with Structure?

    Thanks,
    John

  • #13 / Apr 11, 2011 12:45pm

    Lisa Wess

    20502 posts

    Hi, John -

    Are these Structure entries or Structure types of any sort?  Yes, you can set dynamic=“off” as a parameter of the comment entries tag.

  • #14 / Apr 11, 2011 2:40pm

    JohnGribben

    111 posts

    Hi Lisa,

    Yup, this page is managed as a Structure listing.  Do you think that’s it?

    Thanks!
    John

  • #15 / Apr 11, 2011 5:00pm

    Sue Crocker

    26054 posts

    Hi, John. I don’t know enough about Structure to comment on it. But that would be more of a support question for them.

    In the meantime, it looks like passing the url_title works for you, I’d continue to use it. Make sense?

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

ExpressionEngine News!

#eecms, #events, #releases