4

Using the native Comments Module, I have a comments form and entries on a page with a single blog entry.

I am attempting to add an edit button to allow users to edit their comments on the front-end.

The edit link works fine for a Super Admin. According to the EE documentation, I should be able to edit as a regular member as long as that member is logged in, the author of the comment, and the editing time limit must not have expired.

I have all 3 of those conditions met, yet nothing within the {if editable} renders.

any insight would be appreciated.

update: My setup

{!-- jQuery is included in <head> --}
{exp:comment:edit_comment_script}
<ul id="posted-comments">
    {exp:comment:entries sort="asc" limit="20"}
        <li class="comment" id="comment_{comment_id}">
            <span class="comment_body">{comment}</span>
            {if editable}
                <a href="#" class="edit_link">Edit</a>
                <div class="editCommentBox" style="display:none;">
                    <textarea cols="70" rows="8">{comment_stripped}</textarea><br />
                    <input type="submit" name="cancel" value="Cancel" class="cancel_edit">
                    <input type="submit" name="save" value="Save" class="submit_edit">
                </div>
            {/if}
            <p class="info">
                <span class="name">By {name}</span>
                <span class="date">on {comment_date format="%m/%d/%Y"}</span>
            </p>
        </li>
    {/exp:comment:entries}
</ul>
3
  • 1
    Could you post the relevant snippet of code? Jan 15, 2013 at 22:08
  • are you getting any Javascript console errors? Jan 16, 2013 at 9:31
  • No, I do not get any javascript errors. It seems to be an issue with the Member Group Type 'Members'. Jan 16, 2013 at 18:44

1 Answer 1

1

Some things to check:

  • Is the {exp:comment:edit_comment_script} tag in your header or in your template? The docs don't say specifically but I'd guess it needs to be in your header.
  • Check to see what the variable {editable} actually prints out if anything
  • Check to see what the variable {can_moderate_comment} actually prints out if anything
  • Under Comment Administration Privileges for the member group preferences, make sure "Can edit comments in their own channel entries" is turned on. For the heck of it, turn on all options in that section.
  • Make sure the member you are logged is as when attempting to edit is the same member who posted the comment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.