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.

Problems with comments from non-members

January 11, 2011 3:23pm

Subscribe [10]
  • #1 / Jan 11, 2011 3:23pm

    mfraase

    79 posts

    I’m having multiple problems with comments. I’m not sure if this is new since updating to EE 2.1.3 or if it existed in previous builds.

    Here’s the relevant code for the comment form:

    <!-- START COMMENT FORM -->
    {exp:channel:entries channel="{hasten}" limit="1"}
    {if allow_comments}
    <div id="respond">
    <div id="form_wrap">
    <h3>Leave a reply</h3>
    <p>{exp:comment:form}<br />
    <div class="form-left"><br />
    {if logged_out}<br />
    <input type="text" name="name" id="name" tabindex="1" value="Name (required)"><br />
    <input type="text" name="email" id="email" tabindex="2" value="Email (required)"><br />
    <input type="text" name="url" id="url" tabindex="3" value="Website (optional)"><br />
    {/if}<br />
    {if logged_in}<br />
    <input type="text" name="name" id="name" tabindex="1" value="{name}" disabled="disabled" /><br />
    <input type="text" name="email" id="email" tabindex="2" value="{email}" disabled="disabled" /><br />
    <input type="text" name="url" id="url" tabindex="3" value="{url}" disabled="disabled" /><br />
    {/if}<br />
    </div><br />
    <div class="form-right"><br />
    <textarea rows="9" cols="10" name="comment" id="comment" tabindex="4">Type your comment here…</textarea><br />
    {if logged_out}<br />
    <input type="checkbox" name="save_info" value="yes" {save_info} /><br />
    <label for="save_info"><small>Remember my personal information</small></label><br />
    {/if}<br />
    <input type="checkbox" name="notify_me" value="yes" {notify_me} /><br />
    <label for="notify_me"><small>Notify me of follow-up comments?</small></label><br />
    {if captcha}<br />
    Submit the word you see below:</p>
    
    <p>{captcha}</p>
    
    <p>{/if}<br />
    <input type="submit" name="submit" tabindex="5" value="Submit" class="sb" /><br />
    </div><br />
    <input type='hidden' name='comment_post_ID' value='6' id='comment_post_ID' /><br />
    <input type='hidden' name='comment_parent' id='comment_parent' value='0' /><br />
    {/exp:comment:form}

    Regardless of whether or not I have ExpressionEngine 2.1.3’s comment posting preferences set to require membership to post comments for the channel, non-members are not allowed to post comments.

    When a non-member attempts to post a comment (with EE comment posting preferences for the channel set to *not* require membership to post comments), the user receives EE’s You are not allowed to post comments error.

  • #2 / Jan 12, 2011 4:36am

    John Henry Donovan

    12339 posts

    mfraase,

    You should not nest any comment tags inside the channel:entries tag so move them out for a start. Add some channel= parameters to your comment form and entries tag

    Does the entry have commenting enabled?

  • #3 / Jan 24, 2011 9:03pm

    davidrussell

    102 posts

    I am seeing this issue as well in EE 2.1.1. Build 20101020. I haven’t upgraded this site because of all the bugs in subsequent builds, especially the custom layout issues. Since the OP is using 2.1.3, it may not matter much anyway if I did upgrade.

    I am using very common markup and all EE tags appropriately ordered. Both entries and comments tags have channel parameters set. Commenting is enabled on channel prefs and individual entry.

  • #4 / Jan 24, 2011 9:11pm

    davidrussell

    102 posts

    Tried a few other things:

    1.) Exchanged comment module files in /system/expressionengine/modules with latest build.
    2.) Added path to Comment URL in Channel Prefs (it had previously not been set.)
    3.) Removed and re-installed Comment module (we had no comments in the system yet, so this was okay to do.)

    To no avail.

  • #5 / Jan 24, 2011 10:07pm

    davidrussell

    102 posts

    More attempted fixes:

    4.) Cleared .htaccess file.
    5.) Remove all markup except the comment:entries and comment:form.
    6.) Modified the whitelist to include my IP. Also disabled the Blacklist/Whitelist module (found some old forum posts online about MovableType that had this as a fix for this problem.)
    7.) Tried the commenting system on a completely different channel and template.
    8.) Upgraded to EE 2.1.3 Build 20101220.

    No dice. Still seeing the error on comment submit.

  • #6 / Jan 25, 2011 5:07pm

    Ingmar

    29245 posts

    Logged-in members can post? Posting comments to this channel is generally turned on?

  • #7 / Jan 25, 2011 5:10pm

    mfraase

    79 posts

    In my case, logged-in members *can* post as expected. And yes, comments for the channel (and article) are enabled.

  • #8 / Jan 25, 2011 5:18pm

    davidrussell

    102 posts

    In my case, also, logged in members can post. Yes, comments for the channel and entry are enabled.

  • #9 / Jan 26, 2011 9:01am

    Sue Crocker

    26054 posts

    Michael, did you modify your form like John suggested?

    David/Michael - if you use the code listed in the docs - http://ellislab.com/expressionengine/user-guide/modules/comment/entries.html#submission_form - does that work?

  • #10 / Jan 26, 2011 1:25pm

    davidrussell

    102 posts

    Sue, no. Same error.

  • #11 / Jan 27, 2011 3:25am

    John Henry Donovan

    12339 posts

    David,

    Can you link to your template with the default code please?
    This template should only have the example code from the docs and nothing else

    Have you a htaccess file? Are you removing index.php?

  • #12 / Jan 27, 2011 2:07pm

    davidrussell

    102 posts

    John,

    Check it out: http://adcag.org/blog/entry/test-blog-entry

    The cool thing is that I checked this version while _logged in_ and it shows a PHP error:

    Fatal error: Call to undefined method CI_Security::secure_forms_check() in /[path-to-system]/expressionengine/modules/comment/mod.comment.php on line 2647
  • #13 / Jan 28, 2011 3:10am

    John Henry Donovan

    12339 posts

    David,

    This template as I mentioned should only have the example code from the docs and nothing else

    In your Security and Session Preferences do you have Process form data in Secure Mode? turned on or off?

    Open up /system/expressionengine/libraries/EE_Security.php What’s on line 47?
    There should be a secure_forms_check function

  • #14 / Jan 28, 2011 9:53am

    davidrussell

    102 posts

    John,

    Okay, the template is void of any other markup except for the comment form.

    http://adcag.org/blog/entry/test-blog-entry

    In my 2.1.1 version, I had no EE_Security.php file at all in libraries. I copied the file from 2.1.3 into my 2.1.1 install and now the PHP error is gone and _logged in_ I can submit comments again. Strange that I was completely missing a file, but now that it’s there, it seems fine. I am currently running the 2.1.1 version because it’s less buggy for my client in other areas, but I can switch to 2.1.3 if needed.

    In Security and Session Preferences I had Process form data in Secure Mode ON. However, switching to off and re-trying the form results in the same error.

  • #15 / Jan 29, 2011 2:09pm

    Greg Salt

    3988 posts

    Hi David,

    Please do upgrade to the latest version and build and then test this again.

    @Michael, how are you getting on?

    Cheers

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases