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.

Trouble with comment submission form

October 18, 2009 3:10pm

Subscribe [2]
  • #1 / Oct 18, 2009 3:10pm

    Tim Griesser

    13 posts

    Hello, I am trying to set up the comment submission form for a single entry across multiple sites…however I am getting a “You are not authorized to perform this action” error on submission of the comment. I have checked the comment posting permissions for the weblog and made sure comments are enabled, and I’m pretty sure there is nothing i am missing in that respect. This is happening when logged in as the super admin as well.

    I have the following code in place

    {exp:weblog:entries weblog="listing" site="siteA" status="open" entry_id="5"}
    
    {title}<br>
    {address_1}<br>
    {description}<br>
    <br>
    
    <h3>Add Review:</h3>
    
    <p>{exp:comment:form weblog="listing" entry_id="5" limit="1" site="siteA" preview="site/preview"}<br />
    <label class="labelone" for="name">Name:</label></br><input type="text" name="name" value="{name}" id="name" size="18"/></p><br />
    <label class="labeltwo" for="comment">Add a Review:</label><textarea name="comment" font="arial" value="{comment}" rows="10" id="comment" size="20"></textarea></p>
    
    <p>{if captcha}<br />
     Please enter the word you see in the image below:<br />
         {captcha}</p>
    
    <p><input type="text" name="captcha" value="{captcha_word}" size="20" maxlength="20" style="width:140px;" /></p><br />
     <input type="submit" name="submit" value="Submit" /></p><br />
    {if:else}<br />
    <input class="commentsubmit" type="submit" name="submit" value="Submit" /></p><br />
    {/if}</p>
    
    <p>{/exp:comment:form}<br />
    {/exp:weblog:entries}

    I have similar code working on a live site (minus the site paramater), meanwhile I am working with the MSM I downloaded on a local dev site before I put it live and replace the non MSM site

    Is there anything I might be missing that would be causing this error?

  • #2 / Oct 18, 2009 3:32pm

    Greg Salt

    3988 posts

    Hi tgriesser10,

    You seem to have things a little mixed up here. You shouldn’t nest the comment form tag within the weblog entries tag. So, to try and troubleshoot this, would you please move the comment form tag outside the weblog entries tag and then try posting a comment.

    Cheers

    Greg

  • #3 / Oct 18, 2009 3:54pm

    Tim Griesser

    13 posts

    Okay, I un-nested the comment form tag as seen below…still no luck.

    {exp:weblog:entries weblog="listing" site="siteA" status="open" entry_id="5"}
    
    {title}<br>
    {address_1}<br>
    <br>
    
    <h3>Add Review:</h3>
    <p>{/exp:weblog:entries}</p>
    
    <p>{exp:comment:form weblog="listing" site="siteA" entry_id="5" limit="1"}<br />
       <label class="labelone" for="name">Name:</label></br><input type="text" name="name" value="{name}" id="name" size="18"/></p><br />
       <label class="labeltwo" for="comment">Add a Review:</label><textarea name="comment" font="arial" value="{comment}" rows="10" id="comment" size="20"></textarea></p>
    
    <p>{if captcha}<br />
    Please enter the word you see in the image below:<br />
    {captcha}</p>
    
    <p><input type="text" name="captcha" value="{captcha_word}" size="20" maxlength="20" style="width:140px;" /></p><br />
    <input type="submit" name="submit" value="Submit" /></p></p>
    
    <p>{if:else}<br />
    <input class="commentsubmit" type="submit" name="submit" value="Submit" /></p><br />
    {/if}</p>
    
    <p>{/exp:comment:form}

    I’m trying my best to figure out what this might be, but i’ve gone through the comment posting preferences in the section management and ensured that
    Allow comments? -> Y
    Require membership? -> N
    Enable captcha -> Y
    Require email -> N
    Moderate comments -> N

    Thanks for your help

  • #4 / Oct 18, 2009 4:02pm

    Greg Salt

    3988 posts

    Hi Tim,

    Okay. Before we go any further can you please review the Troubleshooting Error Messages Knowledge Base article and make sure that you’ve tried these options first.

    Cheers

    Greg

  • #5 / Oct 18, 2009 4:13pm

    Tim Griesser

    13 posts

    Sure enough, changing the “Require IP Address and User Agent when receiving comments?” setting worked.

    Thanks.

  • #6 / Oct 18, 2009 4:17pm

    Greg Salt

    3988 posts

    Hi Tim,

    Glad that you’re sorted. Please post back if you have further problems.

    Cheers

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases