New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module Blog. Wrong premoderation algorithm for comments. #2573

Closed
Sellato opened this Issue Jun 28, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@Sellato
Contributor

Sellato commented Jun 28, 2018

Type

  • Non critical bug

Problem description

If premoderation option enabled, premoderation algorithm works at this time like this:

  1. User post a comment
  2. Post is published
  3. Admin can mark a post as "premoderated"

I think this is wrong.

The right algorithm should be:

  1. User post a comment
  2. Post is market as premoderated and don't published
  3. Admin get a message and decide publish or not this comment

Steps to reproduce

post a comment at demo site http://demo.fork-cms.com/

Expected behavior / Proposed solutions

Mark all new posts as premoderated by default if "premoderation" option is enabled.

@carakas

This comment has been minimized.

Member

carakas commented Jun 28, 2018

Your description of the current algorithm is incorrect.

if ($this->isModerationFilterEnabled()
    && !FrontendBlogModel::isModerated($comment['author'], $comment['email'])) {
    $comment['status'] = 'moderation';
}
  1. User posts a comment for the first time
  2. Post is marked as in moderation
  3. Admin marks post as published
  4. User posts a comment for the second time
  5. User has already been approved once so the post is published to lighten the load of the admin

Maybe we need an extra setting that toggles whether step 5 should be enabled or not

@Sellato

This comment has been minimized.

Contributor

Sellato commented Jun 28, 2018

it seems that this is not working :(

Post is marked as in moderation

Premoderation is enabled:
comments-enable-moderation

There is 2 comments in current blog post:
2comments

I add my comment and it posted immediately without moderation
new-comment-without-moderation

@carakas carakas modified the milestones: 5.4.0, 5.4.1 Aug 7, 2018

@carakas carakas self-assigned this Oct 11, 2018

@carakas

This comment has been minimized.

Member

carakas commented Oct 11, 2018

@Sellato there was a bug indeed :) It will be fixed in the next release :) Moderation only worked when the spamfilter was enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment