Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error while opening notification menu #19728

Closed
simone-gasparini opened this issue Sep 13, 2022 · 2 comments · Fixed by #19730
Closed

Fatal error while opening notification menu #19728

simone-gasparini opened this issue Sep 13, 2022 · 2 comments · Fixed by #19730
Assignees
Labels
Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@simone-gasparini
Copy link

Expected Behavior

Open notification menu and see items

Current Behavior

Fatal error page with stacktrace

Piwik\Changes\Model::doChangesExist(): Argument #1 ($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 simone-gasparini added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Sep 13, 2022
@simone-gasparini
Copy link
Author

simone-gasparini commented Sep 13, 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
Copy link
Member

sgiehl commented Sep 13, 2022

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

@sgiehl sgiehl added Regression Indicates a feature used to work in a certain way but it no longer does even though it should. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Sep 13, 2022
@sgiehl sgiehl added this to the 4.12.0 milestone Sep 13, 2022
@sgiehl sgiehl self-assigned this Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants