@simone-gasparini opened this Issue on September 13th 2022

Expected Behavior

Open notification menu and see items

Current Behavior

Fatal error page with stacktrace

Piwik\Changes\Model::doChangesExist(): Argument <a href='/1'>#1</a> ($newerThanId) must be of type ?int, string given, called in /var/www/vhosts/xxx.yyy/matomo.xxx.yyy/core/Changes/UserChanges.php on line 48
in /var/www/vhosts/xxx.yyy/matomo.xxx.yyy/core/Changes/Model.php line 139

Every page i go will redirect to this error page:

https://matomo.xxx.yyy/index.php?module=CoreHome&action=index&idSite=2&period=day&date=yesterday

Possible Solution

Steps to Reproduce (for Bugs)

  1. New installation
  2. Login
  3. Create new site
  4. Open notification menu
  5. Matomo will show fatal error page with no way to get back to home

Context

Your Environment

  • Matomo Version: 4.11.0
  • PHP Version: 8.1.10
  • Server Operating System: Ubuntu 20.04.5
  • Additionally installed plugins: All plugin disabled
  • Browser:
  • Operating System:
@simone-gasparini commented on September 13th 2022

Digging into the code...
https://github.com/matomo-org/matomo/blob/4.x-dev/core/Changes/UserChanges.php#L48

$idchangeLastViewed is string(19) "0000-00-00 00:00:00" but ?int is required by doChangesExist()

Watching the DB table

Schermata 2022-09-13 alle 15 52 18

This issue happen only with entries in the matomo_changes table, this enable the notification icon in the header menu.

@sgiehl commented on September 13th 2022 Member

Hi @simone-gasparini
Thanks for reporting this issue. Guess I found the problem. I'll prepare a fix for it...

This Issue was closed on September 14th 2022
Powered by GitHub Issue Mirror