Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




comment moderation for editor doesn't work

UserPost

9:37 am
April 20, 2011


doran

Member

posts 13

1

Hello,

with my test user who has a wordpress role of an editor (and afaik no special restrictions), I can see the comments list in the backend, but I can't do anything anything with them. The 'row-actions' you normally can see after mouse over are simply not available, except for one comment - the initial wordpress test comment in the "hello world" article. 

When I disable role scoper (1.3.28/wordpress 3.1.1), thows row actions are available again for all comments. 


To track down the problem, I have made another comment to that "hello world" article, which also doesn't show the row-actions. Then I compared those two comments in the mysql wp_comments table and made them more ore less identical (except for the comment id). Same thing as before: I can moderate the initial wordpress comment, but I can't moderate the new comment.

I don't know what to do any more. Hope you can give me a hint.

thx doran

9:51 am
April 20, 2011


Kevin

Admin

posts 2503

2

Take a look at Roles > Options > RS Role Defs. If "Post Editor" or "Page Editor" rows say anything about a mismatch with WP caps, click the "sync" checkbox and Update.

10:21 am
April 20, 2011


doran

Member

posts 13

3

Thanks for the hint, but there is/wasn't any mismatch and I have tried that before. I also have tried a "Revert to Defaults". 

12:35 pm
April 20, 2011


Kevin

Admin

posts 2503

4

This was due to WP 3.1's introduction of the 'edit_comment' meta cap, which causes a comment ID to be passed into the user_has_cap hook. RS was interpreting that as a post ID. Fixed in the update Role Scoper development code (1.3.29-dev).

If you want to apply the fix manually, edit cap-interceptor_rs.php as follows:

change:

$object_id = ( isset($args[2]) ) ? (int) $args[2] : 0;

to:

$object_id = ( isset($args[2]) ) ? (int) $args[2] : 0;

if ( $object_id && ( 'edit_comment' == $args[0] ) ) {
	if ( $comment = get_comment( $object_id ) )
		$object_id = $comment->comment_post_ID;
	else
		$object_id = 0;
}

4:39 am
April 21, 2011


doran

Member

posts 13

5

Thanks you very much - it works now as expected.Smile


About the Agapetry forum

Currently Online:

10 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1246

Posts: 5654

Members:

There are 1257 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin