table node_counter does not exist

Created on 10 February 2025, 3 months ago

Problem/Motivation

After statistics installed, get database exception:

Drupal\Core\Database\DatabaseExceptionWrapper:
                                                 SQLSTATE[42S02]: Base table or view not found: 1146 Table
                                                 'jamesrom_d11.node_counter' doesn't exist: SELECT
                                                 "nc"."totalcount" AS "totalcount"

and then fatal error.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tjtj

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @tjtj
  • Hey @tjtj,

    I have tried reproducing the issue on my local, although on the module installation I didn't receive any error related to the database table. I am using version 1.0.0 of Statistics module and also tried the same on both Drupal 10 and 11.

    And, on looking into the Database I can see the table node_counter was present there.

    Can you please provide the steps to reproduce the issue, If I am missing something here.
    Thanks !

  • πŸ‡ΊπŸ‡ΈUnited States tjtj

    node_counter is NOT in my database. How do I create it? Surely installing statistics should create it?

  • πŸ‡ΊπŸ‡ΈUnited States tjtj

    Ah. I uninstalled it, reinstalled it, and node_counter is there

  • πŸ‡«πŸ‡·France fgm Paris, France

    Looks like you found your solution.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024