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, getting "Unable to receive your comment at this time" error

February 12, 2011 1:31pm

Subscribe [5]
  • #1 / Feb 12, 2011 1:31pm

    northk

    51 posts

    Greetings,

    I’m getting the error “Unable to receive your comment at this time.” back from EE’s comment form processing code. This happens in the following circumstance: I fail to enter one of the required fields (name or email), then submit the form, then get the expected error back from EE that the name or email is missing.

    Then, I fill out the additional required fields and click submit again.  Unfortunately then I get the “Unable to receive your comment at this time.” message. After that, the form won’t allow submission no matter what. That seems like incorrect behavior to me. This prevents users from making a mistake and then correcting that mistake and re-submitting the form.

    If I fill in all the fields correctly the first time, the form submits OK. Perhaps I’m doing something wrong. I’m using AJAX to submit the form, but that shouldn’t make a difference. Here is my comment form code. Please help.

    Thanks,

    North

    {exp:channel:entries channel="blog-articles" disable="categories|member_data|pagination" limit="1"} 
        {if allow_comments} 
    {exp:comment:form} 
    
    {!-- this holds any return messages from the AJAX form post, good or bad --}    
            <div class="box round-box darker comment-message-box">
                
            </div>
    
            <label for="name">
                Name (required):
            </label>
            <input type="text" id="name" name="name" />
            <label for="email">
                Email (required but not shown): 
            </label>
            <input type="text" id="email" name="email" />
            <label for="url">
                Website: 
            </label>
            <input type="text" id="url" name="url" />
            <label for="comment">
                Comment:
            </label>
                <textarea id="comment" name="comment" rows="8">{comment}</textarea>
            <input type="checkbox" id="notify_me" name="notify_me" value="yes" {notify_me} />
            <label for="notify_me" id="notify_me_label">Notify me of follow-up comments</label>
            
                <a href="#" class="action-button"><small>Submit</small></a>        
            
    {/exp:comment:form} 
        {/if} 
    {/exp:channel:entries}
  • #2 / Feb 13, 2011 2:48pm

    Greg Salt

    3988 posts

    Hi northk,

    You should definitely not be nesting the comment form tag inside the channel entries tag so please change that. Does the comment form work correctly without the AJAX layer? That error message suggests that the comment has already been submitted i.e. that exact comment already exists.

    Cheers

    Greg

  • #3 / Feb 14, 2011 11:05pm

    northk

    51 posts

    Hi Greg,

    Thanks for responding. I will try removing the tag nesting and see if that makes a difference. I’m curious though, how do I find out which EE tags can be nested and which cannot? As far as I know, some tags can be nested.

    Thanks,

    NorthK

  • #4 / Feb 15, 2011 10:33am

    Sue Crocker

    26054 posts

    I don’t know that there is a definitive listing of what can and can’t be nested. If you see anything in the docs that doesn’t cover that kind of information on a per tag basis, let us know and we’ll see about upgrading the docs.

  • #5 / May 02, 2011 8:45pm

    oregoncub

    25 posts

    I am having this exact same problem.  Comments were working but not anymore.

    Was this issue resolved?

    <div id="comment_entry_form">
        {exp:comment:form channel="news"}
            <h3>Add Your Comment</h3>
    <p>        {if logged_out}<br />
                <div class="comment_label"><br />
                    Name:<br />
                </div></p>
    
    <p>            <div class="comment_field"><br />
                    <input type="text" class="textbox" name="name" value="{name}" /><br />
                </div><br />
                <br />
                <div class="comment_label"><br />
                    Email:<br />
                </div></p>
    
    <p>            <div class="comment_field"><br />
                    <input type="text" class="textbox" name="email" value="{email}" /><br />
                </div></p>
    
    <p>            <div class="comment_label"><br />
                    URL:<br />
                </div><br />
        <br />
                <div class="comment_field"><br />
                    <input type="text" class="textbox" name="url" value="{url}" /><br />
                </div><br />
            {/if}<br />
            <br />
            <div class="comment_label"><br />
                Comments:<br />
            </div></p>
    
    <p>        <div class="comment_field"><br />
                <textarea name="comment" cols="60" rows="12">{comment}</textarea><br />
            </div></p>
    
    <p>        {if logged_out}<br />
                <div class="comment_field"><br />
                    <br />
                    <input type="checkbox" class="check" name="save_info" value="yes" {save_info} /> <br />
                    Remember me?<br />
                    <br />
                </div><br />
            {/if}</p>
    
    <p>        <div class="comment_field"><br />
                <br />
                <input type="checkbox" class="check" name="notify_me" value="yes" {notify_me} /> <br />
                Shoot me an email when someone responds?<br />
                <br />
            </div><br />
    {if captcha}<br />
                <div class="comment_label"><br />
                    Enter this word:<br />
                </div><br />
                <div class="comment_field"><br />
                    {captcha}<br />
                </div><br />
                <div class="comment_label"><br />
                    Here:<br />
                </div><br />
                <div class="comment_field"><br />
                    <br />
                    <input type="text" class="textbox" name="captcha" value="" <br />
                    size="20" maxlength="20" style="width:140px;" /><br />
                    <br />
                </div><br />
            {/if}</p>
    
    <p>        <div class="comment_field"><br />
                <br />
                <input type="image" class="comment_submit" <br />
                src="{site_url}/uploads/send-button.gif" name="submit" value="Submit" /><br />
                <br />
            </div></p>
    
    <p>    {/exp:comment:form}<br />
            </div>

  • #6 / May 02, 2011 8:49pm

    Sue Crocker

    26054 posts

    Hi, oregoncub.

    What changed between now and then? Is this on a MSM site? Are you getting an error? Do you have a link where it is occurring?

  • #7 / May 02, 2011 8:55pm

    oregoncub

    25 posts

    I migrated the server to production.  This is an MSM site, and it’s happening on both the main and sub-site.

    It can be seen:

    oregoncub.org

    and:

    news.cubconnects.org

  • #8 / May 02, 2011 8:59pm

    Sue Crocker

    26054 posts

    I just added a comment to:

    http://oregoncub.org/news/posts/revised-rep-settlement-agreement

    No error, but the comment needs to be approved.

  • #9 / May 02, 2011 8:59pm

    oregoncub

    25 posts

    Sue, I just received your comment on oregoncub.org.  Did you not get the message that I’m getting?

  • #10 / May 02, 2011 9:00pm

    oregoncub

    25 posts

    I’m still getting this error.  What would be causing me to get this error and not you?

  • #11 / May 02, 2011 10:00pm

    John Henry Donovan

    12339 posts

    oregoncub,

    Can you completely logout of your control panel so you are adding a comment as a guest please?
    Make sure the name, email and URL fields are showing. That means you are not logged in.

    If this works for you then the issue would seem to point at you being logged in submitting a comment.
    So next remove the {if logged_in} tags and login to see if this works for you. Also see if everything is auto-populated for you correctly i.e {name}, {email} and {url}

    Also it would be helpful if you could tell us the version and build of EE you are using please

  • #12 / May 03, 2011 1:17pm

    oregoncub

    25 posts

    Everything is working now for some reason, and I’ve made no changes since yesterday.
    I wasn’t logged in when this was happening before, as I use a different browser for looking at the sites. 

    This morning I seem to be able to leave comments whether I’m logged in or not.
    I’m glad it’s working now, though a bit frustrated to not know what the issue was initially!

    I’m using
    v2.1.3 - Build:  20101220

    I guess this can be closed.  Thanks for all your help!

  • #13 / May 03, 2011 5:47pm

    Brandon Jones

    5500 posts

    Hi oregoncub,

    Well, glad it’s working in any case! Don’t hesitate to post again.

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

ExpressionEngine News!

#eecms, #events, #releases