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 Template Not Submitting

October 10, 2011 6:08pm

Subscribe [3]
  • #1 / Oct 10, 2011 6:08pm

    ROCKET MEDIA

    153 posts

    I am currently trying to setup the comments module on my expression engine site.

    I tried to simplify my code below as much as possible.

    {exp:channel:entries channel="blog"}
    <div>
    {body_blog}
    </div>
    {/exp:channel:entries}
    {exp:comment:form channel="blog" return="blog/article" }
     
    {if logged_out}
      <label for=“name”>Name:</label> <input type=“text” name=“name” value=”{name}” size=“50” /><br >
      <label for=“email”>Email:</label> <input type=“text” name=“email” value=”{email}” size=“50” /><br >
      <label for=“location”>Location:</label> <input type=“text” name=“location” value=”{location}” size=“50” /><br >
      <label for=“url”>URL:</label> <input type=“text” name=“url” value=”{url}” size=“50” /><br >
    {/if}

    <label for=“comment”>Comment:</label>

    <textarea name=“comment” cols=“70” rows=“10”>{comment}</textarea>
    <label><input type=“checkbox” name=“save_info” value=“yes” {save_info} /> Remember my personal information</label>

    <label><input type=“checkbox” name=“notify_me” value=“yes” {notify_me} /> Notify me of follow-up comments?</label>


    {if captcha}
      <label for=“captcha”>Please enter the word you see in the image below:</label>

      {captcha}

      <input type=“text” name=“captcha” value=”{captcha_word}” maxlength=“20” /></p>
    {/if}

    <input type=“submit” name=“submit” value=“Submit” />
    {/exp:comment:form}

    Link to the page Here

    My problem is when you try to submit the form it goes to the site index page and doesn’t enter into the database. I have also turned off htaccess to try and get rid of any conflicts. Any help would be appreciated.

  • #2 / Oct 11, 2011 3:56am

    John Henry Donovan

    12339 posts

    Hi ROCKET MEDIA,

    try adding the url_title parameter to the comment Tag like so.

    What page do you want the return to go to?
    If it was the blog index then use this

    {exp:comment:form channel="blog" return="blog/index" url_title="{segment_3}"}
  • #3 / Oct 11, 2011 11:19am

    ROCKET MEDIA

    153 posts

    I went ahead and added the new parameter and still no change. I did notice if i look a the source of the form on the front end it has
    “<form id=“comment_form” method=“post” action=“http://servicechampions.com/index.php”  >”  where is the post action pulled from?

  • #4 / Oct 11, 2011 9:20pm

    Dan Decker

    7338 posts

    ROCKET MEDIA,

    ExpressionEngine post actions generally route through index.php since it’s the primary controller. What version of ExpressionEngine are you using so I can try to replicate this. Are you using any add-ons that might be affecting this?

    Cheers,

  • #5 / Nov 03, 2011 5:05pm

    ROCKET MEDIA

    153 posts

    This site is running Expression Engine 2.1.3

  • #6 / Nov 04, 2011 11:44am

    ROCKET MEDIA

    153 posts

    I don’t believe we’re using any add ons that would be affecting this. The following modules are installed: Channel, Comment, Emoticon, Mailing List, Member, NavEE, Pages, Playa, Query, Referrer, RSS, Search, Statistics, Wygwam.

    Please let me know if you need any other information.

  • #7 / Nov 04, 2011 1:21pm

    ROCKET MEDIA

    153 posts

    Doh! I got it working.

    The site config was specifying the site url without the www prefix but the form was sending from the site with the www, so technically it was posting from a ‘different’ site and being ignored.

  • #8 / Nov 04, 2011 5:37pm

    Kevin Smith

    4784 posts

    Oh! Very good catch. Those simple little buggers are usually some of the most frustrating to troubleshoot.

    Glad you were able to get it solved. Let us know if we can help again in the future!

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

ExpressionEngine News!

#eecms, #events, #releases