I am testing out the Drupal 8 core Forum module. I am using a theme that I based off of Acquia Lightning. I have successfully installed the module and added Containers, Forums and Topics. My issue is that the Topics I create don't seem to get associated with the Forum taxonomy. In other words, when I go to /forum I see my containers and forums but every forum has Topics: 0, Posts: 0, Last Post: n/a.

I have tried clearing cache, running cron, looking at the watchdog logs but nothing seems to indicate why it isn't working. I am not receiving any memory errors, white screen of death, etc. All other site functions seem to work properly: I can save content and taxonomies, create new views, assign blocks, etc.

See the attached screen grab. I could use some ideas on what might be causing this. Any assistance would be greatly appreciated.

enter image description here



drush state:set comment.maintain_entity_statistics TRUE


core/modules/comment/src/CommentStatistics.php in the update() function says this:

// Allow bulk updates and inserts to temporarily disable the maintenance of
// the {comment_entity_statistics} table.
if (!$this->state->get('comment.maintain_entity_statistics')) {

In my case, somehow this was not set, causing this function to bail out and not update the comment_entity_statistics table. Drupal needs this table updated to display the proper forum posts.

"drush state:get comment.maintain_entity_statistics" can be used to check if this is already set.

  • The comment_entity_statistics database table contains statistics about the comments. It's not used to count the number of posts a forum contains, since those are nodes, not comments. That table is used to show new close to a node title, to mean there was new activity on that node, for example a new comment.
    – apaderno
    Jan 2 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.