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.

cant seem to post comment "You are not authorized to perform this action"

February 18, 2009 10:18am

Subscribe [3]
  • #1 / Feb 18, 2009 10:18am

    Martin_Fuel

    8 posts

    Hi, I can’t seem to post a comment on a weblog that has comments allowed, it just throws up an error message “You are not authorized to perform this action”.

    I get the message regardless of whether I am signed in as admin or not signed in at all.

    Here is my whole template in case I have made any stupid mistakes…

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html >
        <head>
            {embed="embeds/head"}
        </head>
        <body>
            <div id="wholecontainer">
                <div id="left_col">
                    <a href="http://{site_url}">{site_url}templates/library/images/logo.png</a>
                    <div id="nav">
                        <ul>
                            {embed="embeds/nav"}
                        </ul>
                    </div>
                    <div id="logos">
                        {site_url}templates/library/images/round_logo.png
                        {site_url}templates/library/images/exploits_logo.png
                    </div>
                </div>
                <div id="main_col">
                        {exp:weblog:entries weblog="guestbook" limit="1"}
                        
                            <div id="page-content">
                        
                                <h1>{title}</h1>
                                
                                {body}
                                
                                {exp:comment:form weblog="guestbook" preview="guestbook/index" url_title="welcome_to_the_guestbook"}
    
                                {if logged_out}
                                
                                Name: <input type="text" name="name" value="{name}" size="50" /></p>
                                
                                Email: <input type="text" name="email" value="{email}" size="50" /></p>
                                
                                Location: <input type="text" name="location" value="{location}" size="50" /></p>
                                
                                URL: <input type="text" name="url" value="{url}" size="50" /></p>
                                
                                {/if}
                                
                                <textarea name="comment" cols="70" rows="10">{comment}</textarea></p>
                                
                                <input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information
                                
                                <input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?
                                
                                {if captcha}
                                
                                Please enter the word you see in the image below:
                                
                                {captcha}
    
                                <input type="text" name="captcha" value="{captcha_word}" maxlength="20" /></p>
                                
                                {/if}
                                
                                <input type="submit" name="submit" value="Submit" />
                                <input type="submit" name="preview" value="Preview" />
                                
                                {/exp:comment:form}
                                    
                            </div>
                                
                        {/exp:weblog:entries}
                        
                </div>
            </div>
        </body>
    </html>

    anyone have any ideas? I would be extremely grateful

    [Mod edit: moved to Technical Support forum]

  • #2 / Feb 18, 2009 10:31am

    eviluncledave

    77 posts

    Does it work if you take your comment tag out of the weblog entries tag?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html >
        <head>
            {embed="embeds/head"}
        </head>
        <body>
            <div id="wholecontainer">
                <div id="left_col">
                    <a href="http://{site_url}">{site_url}templates/library/images/logo.png</a>
                    <div id="nav">
                        <ul>
                            {embed="embeds/nav"}
                        </ul>
                    </div>
                    <div id="logos">
                        {site_url}templates/library/images/round_logo.png
                        {site_url}templates/library/images/exploits_logo.png
                    </div>
                </div>
                <div id="main_col">
                
                            <div id="page-content">
                
                              {exp:weblog:entries weblog="guestbook" limit="1"}
                        
                                <h1>{title}</h1>
                                
                                {body}
                                
                              {/exp:weblog:entries}
                               
                              {exp:comment:form weblog="guestbook" preview="guestbook/index" url_title="welcome_to_the_guestbook"}
                
                                            {if logged_out}
                                            
                                            Name: <input type="text" name="name" value="{name}" size="50" /></p>
                                            
                                            Email: <input type="text" name="email" value="{email}" size="50" /></p>
                                            
                                            Location: <input type="text" name="location" value="{location}" size="50" /></p>
                                            
                                            URL: <input type="text" name="url" value="{url}" size="50" /></p>
                                            
                                            {/if}
                                            
                                            <textarea name="comment" cols="70" rows="10">{comment}</textarea></p>
                                            
                                            <input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information
                                            
                                            <input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?
                                            
                                            {if captcha}
                                            
                                            Please enter the word you see in the image below:
                                            
                                            {captcha}
    
                                            <input type="text" name="captcha" value="{captcha_word}" maxlength="20" /></p>
                                            
                                            {/if}
                                            
                                            <input type="submit" name="submit" value="Submit" />
                                            <input type="submit" name="preview" value="Preview" />
                                            
                                {/exp:comment:form}
                            </div>                    
                </div>
            </div>
        </body>
    </html>
  • #3 / Feb 18, 2009 10:44am

    Martin_Fuel

    8 posts

    thanks for the suggestion but unfortunately not. I am running EE on MAMP at the moment, could that be an issue?

  • #4 / Feb 18, 2009 10:53am

    eviluncledave

    77 posts

    I’m sure you’ve checked, but comments are enabled in both the weblog and on the entry itself, correct?

    If both of those are true then the next things I would check (I’m probably wrong here, but it’s the next thing I would check) are your form security options in the control panel.

    CP Home ›  Admin ›  System Preferences ›  Security and Session Preferences

    Specifically “Process form data in Secure Mode?” and “Deny Duplicate Data?”.

  • #5 / Feb 18, 2009 11:06am

    Martin_Fuel

    8 posts

    I’m sure you’ve checked, but comments are enabled in both the weblog and on the entry itself, correct?

    Yea I checked that and they are.


    If both of those are true then the next things I would check (I’m probably wrong here, but it’s the next thing I would check) are your form security options in the control panel.

    CP Home ›  Admin ›  System Preferences ›  Security and Session Preferences

    Specifically “Process form data in Secure Mode?” and “Deny Duplicate Data?”.


    I did also check that after reading somewhere else on the site about it and turned them both off, still nothing.

  • #6 / Feb 18, 2009 11:09am

    eviluncledave

    77 posts

    Okay, if it’s local, how about toggling the setting for “Require IP Address and User Agent when receiving comments?” on the same admin page?

  • #7 / Feb 18, 2009 11:31am

    Sue Crocker

    26054 posts

    truepresence, have you gone through the items here: EEKB:// You are not authorized to perform this action

  • #8 / Feb 18, 2009 12:23pm

    Martin_Fuel

    8 posts

    Hi thanks for all of your help, just to let you know / if anyone else has this issue. I uploaded to my server and it all worked fine, obviously something to do with it being local.

  • #9 / Feb 18, 2009 12:25pm

    Sue Crocker

    26054 posts

    Glad things are working again. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases