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.

Help With Guest Comment Posting

February 08, 2011 5:53pm

Subscribe [2]
  • #1 / Feb 08, 2011 5:53pm

    TheBronzePatriot

    25 posts

    I’m back on comments again.  I’m trying to combine both the Pages module and a pages template to use a comment entry form.  It’s driving me nuts, so I’ll post it here.

    Basically what I did was create a channel called “pages” that I would use for announcements and what not, however I wanted to use the Pages Module to shorten the URL’s rather than having a longer URL to them.  Everything works as far as the Pages module showing the right entry but what seems to be happening is that when I am logged in I can post comments to this page however when I am logged out it says I cannot post comments which means my guests can’t.

    Now I did some settings checks and comments are enabled for the entry, I did also check NO for the Require IP in the Security settings, I also made sure that the Guests member group can post comments and that membership was not required to post comments.  I can’t figure out why this is happening.  Before my issue was not being able to post at all and this time I can post but none of the guests to my website can.

    Here is my comment form code (outside of the channel entries tag):

    {exp:comment:form channel="pages" url_title="{segment_1}" dynamic="off" entry_id="121"}    
        <label class="rating-comments-label">Do You Have Any Additional Comments?</label>
    
        <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 >
        <textarea name="comment" cols="70" rows="2"></textarea>
    
        <input type="submit">
    {/exp:comment:form}

    Here is my show comment entries code: (outside of the channel entries tag):

    {exp:comment:entries sort="desc" channel="pages" dynamic="off" url_title="{segment_1}" status="open"}
        <div id="comment-left">
            {name}
            {comment_date format="%Y %m %d"}
        </div>
        <div id="comment-right">
            <!-- Start: Insert Rating -->
            {comment}
        </div>
    {/exp:comment:entries}

    Thoughts I had on it were related to my htaccess code that I was using.  That looks like:

    # secure .htaccess file
    <Files .htaccess>
     order allow,deny
     deny from all
    </Files>
    
    # EE 404 page for missing pages
    ErrorDocument 404 /store/error/404
    
    # Simple 404 for missing files
    <FilesMatch "(\.jpe?g|gif|png|bmp|css|js|flv)$">
      ErrorDocument 404 "File Not Found"
    </FilesMatch>
    
    RewriteEngine on
    RewriteBase /store/
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /store/index.php/$1 [L]
    
    # Remove IE image toolbar
    <FilesMatch "\.(html|htm|php)$">
      Header set imagetoolbar "no"
    </FilesMatch>

    I also thought it might be because I am shortening the URL with the Pages Module, but when I am logged in and post comments it posts them to the correct entry meaning that they show up as the entry having comments with it.

    Any ideas?

  • #2 / Feb 08, 2011 8:44pm

    I think you may be confusing the system with your comment form tag by using both the url_title and entry_id parameters. In this case, your best bet might be the entry_id, as if your url_title and page URI do not match, I don’t think the comment module will know which entry you are talking about.

    Again, for the entries tag, I would recommend using the entry_id parameter instead of url_title.

  • #3 / Feb 09, 2011 1:45am

    TheBronzePatriot

    25 posts

    Tried your suggested changes and it still won’t budge.  Strange.  There doesn’t seem to be anything in the template debugger either.

  • #4 / Feb 09, 2011 3:31pm

    Ingmar

    29245 posts

    What version and build of EE are you using? What error message, exactly, are you getting? Please try without mod_rewrite for the time being, too.

  • #5 / Feb 09, 2011 3:36pm

    TheBronzePatriot

    25 posts

    I am using the latest 2.1.3 build (Build: 20101220).  The error message said that “You are not allowed to post comments” or something along those lines.  When I am logged in I can post comments and I again double checked my settings.  The entry itself receives the comments when I am logged in but tosses the error when I am a guest.

  • #6 / Feb 10, 2011 5:10am

    John Henry Donovan

    12339 posts

    TheBronzePatriot,

    Have you got a link to the page in question please?
    You seemed to have covered everything regarding permissions

  • #7 / Mar 01, 2011 4:59am

    TheBronzePatriot

    25 posts

    I figured it out.  It turned out to be that comments were not allowed for guests under a MSM set up.  I shortened my htaccess files and now it works.  Took me a while, but I got it.

  • #8 / Mar 01, 2011 3:44pm

    Ingmar

    29245 posts

    Excellent. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases