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/posting

July 21, 2010 4:31pm

Subscribe [6]
  • #1 / Jul 21, 2010 4:31pm

    dapacreative

    21 posts

    I am currently using EE v2.0.2pb01 and am attempting to set up a blog on my website with comments. When I test the comment form and submit it refreshes the page but doesn not actually submit any comments. I have tried adding in the channel and url_title into the comment form tag with no luck.

    Any help would be very much appreciated.

    Thanks,
    Dan

  • #2 / Jul 21, 2010 5:51pm

    Ingmar

    29245 posts

    Can you try upgrading to 2.1? Also, can you show us the relevant parts of your template?

  • #3 / Jul 21, 2010 5:57pm

    dapacreative

    21 posts

    Entry Form:

    <div id="commentForm">
                                    
        {exp:comment:form channel="{channels}" url_title="{segment_3}"}
        
        {if logged_out} 
            <div class="row">                            
                <div class="label"><label for="name">Your Name:</label></div>
                <div class="input"><input type="text" name="name" value="{name}" class="input"/></div>                    
                
    
            </div>
            
            <div class="row">                            
                <div class="label"><label for="email">Your Email:</label></div>
                <div class="input"><input type="text" name="email" value="{email}" /></div>                    
                
    
            </div>
            
            <div class="row">                            
                <div class="label"><label for="url">Your Website URL:</label></div>
                <div class="input"><input type="text" name="url" value="{url}" /></div>                    
                
    
            </div>
            {/if} 
            
            <div class="row">                            
                <div class="label"><label for="comment">Comment:</label></div>
                <div class="input"><textarea name="comment">{comment}</textarea></div>                    
                
    
            </div>
            
            <div class="row">                            
                <div class="checkbox"><label><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember Me</label></div>
            </div>
                                                     
            <div class="row">                            
                <div class="checkbox"><label><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</label></div>
            </div>
            
            <div class="submit">
                <button class="submitBtn" value="submit" type="submit"><span>Submit</span></button>
            </div>
                                                    
        {/exp:comment:form}
        
    </div>

    Display Code:

    <div id="comments">
                                    
        {exp:comment:entries channel="{channels}" sort="asc"}
        {if count == "1"}<ul class="comments">{/if}
            
            <li class="{switch="rowEven|rowOdd"}">
                <div>
                    <span><a href="http://">{name}</a></span>
                    on {comment_date format="%F %j"}
                </div>
                {comment}
            </li>        
        
        {if count == total_results}</ul><!-- /.comment -->{/if}
        {/exp:comment:entries}
    
        
    
    </div><!-- /#comments -->

    I would like to first try and narrow down the problem and try and fix it before I automatically jump to upgrading to 2.1. Obviously it might come to that but I am very close to launching my site and would rather hold off on upgrading at the moment.

  • #4 / Jul 22, 2010 3:15am

    John Henry Donovan

    12339 posts

    dapacreative,

    Are you moderating your comments?
    Goto your CP Homepage. Under the View column click on Recent Comments. Any there?

    Is your exp:comment:entries tag nested in any other tag?

  • #5 / Jul 22, 2010 10:52am

    dapacreative

    21 posts

    I am not moderating comments. I also checked per your instructions to see if the comments are actually posting and they are not. I also just tried using the code in the user guide (changing the channel name) and it still did not post. This leaves to believe that something is wrong in the system and not in the template. Perhaps updating to 2.1 is the only solution. I will give that a go and see if it helps.

  • #6 / Jul 22, 2010 7:30pm

    Brandon Jones

    5500 posts

    dapacreative,

    Are you removing index.php from your URLs via .htaccess? Disable all URL re-writing and set the site’s index page in General Configuration back to index.php. Then see if the issue persists.

  • #7 / Jul 22, 2010 9:15pm

    dapacreative

    21 posts

    I was not removing index.php via htaccess but I did remove index.php from my general configuration screen. When I put index.php back in the comments began to work. I would still like the ability to remove index.php. Is there some way I can do this?

  • #8 / Jul 23, 2010 1:52am

    John Henry Donovan

    12339 posts

    dapacreative,

    The unofficial EE Wiki has a page with instructions on ways you can completely remove the index.php file from your URLs. Note that this is only possible on some servers and EllisLab does not officially support this use

  • #9 / Jul 30, 2010 6:15pm

    Mason Stewart

    5 posts

    Hey guys, I just ran into the same issue. I upgraded from 2.0beta to 2.1 just a few days ago. I just finished writing the comments code and it was simply refreshing the page, and not posting any comments on (neither on the CP or on the page itself).

    I had previously removed index.php via the “exclude” method. When I added “index.php” back into the “Name of your site’s index page” field per the instructions above, comments started posting and appearing both on the page and the CP. I did notice however that I saw no “thank you for posting your comment” message (I’m not administrating comments by the way).

    So how do we get comments to work while still removing index.php?

  • #10 / Jul 31, 2010 3:23pm

    Greg Salt

    3988 posts

    Hi Mason,

    As John posted above, the Wiki has lots of suggestions for how you might remove index.php from your URIs. We don’t provide official support for this though. If you temporarily remove or rename your .htaccess file do the comments work properly in all respects (including user messages)?

    Cheers

    Greg

  • #11 / Aug 03, 2010 11:19am

    Mason Stewart

    5 posts

    Hey guys, I’m back. Swamped with work. I took some time to further investigate this issue, and as Greg suggested, removed .htaccess. It works fine with .htaccess removed. It even worked fine with just index.php removed from the “Name of your site’s index page” field in the General Configuration, leaving .htaccess intact. Simply by removing that from the General Config settings, I was able to post and administrate comments like I would normally.

    I was using the exclude method to remove index.php, as my clients were going to be able to create new pages via the Pages Module, and I didn’t wish to edit the .htaccess every time they did.

    Is there perhaps some comments config file that needs to be edited? Perhaps remove “index.php” from a path somewhere?

    Thanks so much for the help guys. 😊

  • #12 / Aug 03, 2010 5:38pm

    Ingmar

    29245 posts

    Since we have established that EE’s working as intended with index.php intact I am going to move this to the CodeShare Corner. Thanks.

  • #13 / Aug 05, 2010 1:35pm

    Mason Stewart

    5 posts

    Thanks, Ingmar. So, has anybody else run into this issue?

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

ExpressionEngine News!

#eecms, #events, #releases