Skip to content
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 · Fixed by #2656
Closed

Module Blog. Wrong premoderation algorithm for comments. #2573

Sellato opened this issue Jun 28, 2018 · 3 comments · Fixed by #2656
Assignees
Labels
Milestone

Comments

@Sellato
Copy link
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
Copy link
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
Copy link
Contributor Author

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
Copy link
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
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants