Skip to content

comment_count doesn't get updated when deleting a discussion #2227

@iPurpl3x

Description

@iPurpl3x

Bug Report

Current Behavior
When deleting the discussion, the comment count (users.comment_count in the database) doesn't get updated. Only after creating a new discussion, this will get a correct value again.

Steps to Reproduce

  1. Log into an empty instance, as Admin
  2. Create a new discussion
  3. Check the profile page : should have Posts 1 and Discussions 1.
  4. Delete the discussion that was created (delete forever)
  5. Check the profile page : should have Posts 1 and Discussions 0.

Expected Behavior
At step 5. there should be Posts 0

Environment

  • Flarum version: 0.1.0-beta.13
  • Website URL: localhost
  • Webserver: nginx
  • Hosting environment: local
  • PHP version: 7.3.19
  • Browser: Google Chrome Version 83.0.4103.116

(I Hope this isn't a duplicate, I didn't find anything when searching for this issue...)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions