Matomo.matomo_site_hsr

Hello, after I installed, and activate the plugin Heatmap Session Recorder plugin on my matomo instance, I got the following error:

An exception has been thrown during the rendering of a template (“SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘matomo.matomo_site_hsr’ doesn’t exist”).

Any Idea where this can comes from? I tried disable/enable it again, restarted server. But no success.

I’m using matomo 5.1.2

Thank you

Hi @fredianiadrien_Fredi
Could you try:

$ ./path/to/matomo/console core:update

From:
https://rqt-cl-www.creditmutuel.fr/

Thank you for your quick response. I ran this and got this:

# ./console core:update
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist
ERROR     [2024-10-02 11:23:30] 1366  There was an error while updating the javascript tracker: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_site_hsr' doesn't exist

    *** Update ***

    Database Upgrade Required

    Your Matomo database is out-of-date, and must be upgraded before you can continue.

    Matomo database will be upgraded from version 5.0.0 to the new version 5.1.2.

    The following plugins will be updated: HeatmapSessionRecording.

ERROR     [2024-10-02 11:23:30] 1366  Uncaught exception: /var/www/html/libs/Zend/Db/Statement/Pdo.php(236): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_log_hsr_event' doesn't exist [Query: , CLI mode: 1]

In Pdo.php line 236:
                                                                                                         
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_log_hsr_event' doesn't exist  
                                                                                                         

In Pdo.php line 233:
                                                                                                         
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo.matomo_log_hsr_event' doesn't exist  
                                                                                                         

core:update [--yes] [--skip-cache-clear]

I eventually get the console core:update command work (by deactivating the HeatmapSessionRecorder plugin first). And it did worked.

# ./console core:update

Everything is already up to date.

Now re-activating the HeatmapSession plugin does not work, and I still got the same error message:

An exception has been thrown during the rendering of a template (“SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘matomo.matomo_site_hsr’ doesn’t exist”).

Hi @fredianiadrien_Fredi ,

On installing the plugin, it should create some tables in database related to it, however it seems to be not happening. Can you please uninstall the plugin and delete the files completely and try to install the plugin again.