Hi Everyone,

I have a recent comments block on my site, which displays the most recent comment. Problem is that it is displaying unpublished comments (comments which haven't been approved by admin).

Anyone have any ideas on how to fix this?

Thanks,

Trevor

Comments

vm’s picture

is it the core recent comments block or one you created with say, views.module?
when seeing these unpublished items in the list are you logged in as admin?

what if you were logged in as an authenticated user who isn't the 1st created user?

trevor’s picture

Yes I did use views for the recent comments. The posts are made by non-users (anyone can comment) and they show up regardless of being logged in or not.

vm’s picture

Then you will need to check your filters on the view and ensure you are only pulling in published content

trevor’s picture

Yeah this is what I can't figure out. I've been playing with that and can't get anything to work. I tried adding the filters "node: published or admin" and "node: published" and I tried all the different options but I can't get it to work.

vm’s picture

there are comments thus node: likely won't work as comments aren't nodes.

May want to have a look into the advanced help module's helf files with refernece to views.

trevor’s picture

Anyone?

silverwing’s picture

Have you tried the filter Comment: In moderation for this?

~silverwing

trevor’s picture

Thanks! That was it, I guess I was playing around with the wrong filter.

Thanks Again!

-Trevor

Moscow’s picture

Thanks a lot for the tip! In moderation works fine!