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?