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.

Having a bit of difficulty with commenting module

April 25, 2008 2:06pm

Subscribe [1]
  • #1 / Apr 25, 2008 2:06pm

    stevefink

    136 posts

    Hi folks!

    I’m having slight difficulty with my commenting module. It’s verified to be installed and recognized by Expression Engine. However, when I submit a test comment (while being logged in), it doesn’t show up on my Control Panel for moderation, nor in my comment template that I have setup.

    Really odd. Perhaps I’m missing something simple. Here’s my comments template:

    {exp:comment:entries weblog="foo"}
                    <div class="post_comments">
                        <h2>Comments</h2>
    <p>                    <div class="comment"><br />
                            </p><h4> {name}, on {comment_date format="%Y %m %d"} said:</h4>
    <p>                        <br />
                                {comment}<br />
                            <br />
                        </div><br />
       {/exp:comment:entries}    <br />
                            {if !no_results}              <br />
                       <hr ><br />
                            {/if}<br />
                        </p><h2>Add a Comment</h2>
    <p>                    <fieldset><br />
                            <legend>Add a Comment</legend><br />
                             {exp:comment:form}</p>
    
    <p>                    {if logged_out}<br />
                                <br />
                                    <label for="name">Name:</label><br />
                                    <input id="name" type="text" class="field" value="{name}" /><br />
                                <br />
                                <br />
                                    <label for="email">E-mail:</label><br />
                                    <input id="email" type="text" class="field" value="{email}" /><br />
                                 <br />
                       {/if}<br />
            <br />
                                <br />
                                    <label for="message">Comments:</label><br />
                                    <textarea id="message" rows="5" cols="50">{comment}</textarea><br />
                                <br />
                                <br />
                                <br />
                                    <button id="submit">Submit</button><br />
                <br />
                                <br />
                           {/exp:comment:form}  <br />
                        </fieldset>

    Thank you for your help all,

    /sf

    Mod Edit: Moved to the Technical Support forum.

  • #2 / Apr 27, 2008 11:16am

    Robin Sowell

    13255 posts

    Are you nesting it inside a weblog tag?  You shouldn’t be- but that {if !no_results} suggests you might be- and the syntax is off.

    Can you go ahead and paste the whole template- make sure the comment tag and form aren’t nested inside other tags- and if possible, link to an example page in action?  Also- just for testing, can you set it so non-members can comment, so the form will show?

    And lastly- what version/build are you running?

  • #3 / Apr 27, 2008 1:05pm

    stevefink

    136 posts

    Hi Robin and everyone,

    The problem here was my <textarea> object did not have a name=“comment” attribute. I had to add the appropriate name attribute to the name/email input fields as well. After that, the code above works like a charm. 😊

    Cheers and thank you for the reply,

    /sf

  • #4 / Apr 27, 2008 1:07pm

    Robin Sowell

    13255 posts

    And yes- that was right smack in my face and I didn’t notice it, did I?  Heh.  Glad you did.  And glad that squared things away.  (Though I’m still fuzzy on what that !no_results is up to, but if it works, it works.)

    I’ll go ahead and close this puppy out.

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

ExpressionEngine News!

#eecms, #events, #releases