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

Navigating 'Settings > Personal' menu items without period param causes error #19208

Open
samjf opened this issue May 11, 2022 · 3 comments
Open
Labels
Bug For errors / faults / flaws / inconsistencies etc. Stability For issues that make Matomo more stable and reliable to run for sys admins.

Comments

@samjf
Copy link
Contributor

samjf commented May 11, 2022

Sometimes whilst navigating the settings I manage to get into a broken UI session. During this time I errors saying

The parameter 'period' isn't set in the Request, and a default value wasn't provided.

The stack trace show the following line is to blame: plugins/UsersManager/templates/userSecurity.twig:49

 The following error just broke Matomo (v4.10.0-rc1):

An exception has been thrown during the rendering of a template ("The parameter 'period' isn't set in the Request, and a default value wasn't provided.").
in ./matomo/plugins/UsersManager/templates/userSecurity.twig line 53            

This happens because somehow I get into settings without the period param in the URL. If I navigate to Personal > Security or Personal > Email reports this behavior occurs. It does't seem to affect Personal > Settings

Expected Behavior

If I happen to get to the settings page without a period param in the url it should still function as do the other settings pages.

Current Behavior

If I happen to get to the settings page without a period param in the url the pages 'Security' and 'Email reports' show an error message when visited.

Steps to Reproduce (for Bugs)

  1. Visit http://matomo.test/index.php?module=UsersManager&action=userSettings&idSite=1
  2. Take note that the period param is not supplied as it usually is if visiting the dashboard first
  3. Click on 'Security' or 'Email reports' in the LHS menu

Context

When this happens it isn't clear why it happens or how it should be resolved. Doing things such as refreshing or reentering the URL don't help to resolve it. If any link is supplied without the param you get stuck unless you revisit the dashboard.

Your Environment

  • Matomo Version: 4.9.1 / 4.10
  • PHP Version: 8.1.2
  • Server Operating System: Mac/Linux
  • Additionally installed plugins:
  • Browser: FF
  • Operating System:
@samjf samjf added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label May 11, 2022
@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels May 15, 2022
@sgiehl
Copy link
Member

sgiehl commented May 15, 2022

This is a bug, that was actually always there I guess. One way to solve that issue might be to simply provide a default value like default when trying to read the period parameter on some pages.

@samjf
Copy link
Contributor Author

samjf commented May 16, 2022

We get clusters of reports about these ones from time to time. Unsure exactly how people get into that state, but it does occur somewhat frequently. Perhaps there is a link or browser issue that directs them to the settings without the param.

@sgiehl
Copy link
Member

sgiehl commented May 16, 2022

That for example happens after returning from Google or Yandex when setting up Search Performance plugin. But there are also some other plugins that create links that don't include idSite, date or period, as the plugin actions simply don't need it. Switching to another menu entry might then produce that error. As mentioned providing defaults might fix that for the most cases. Guess that should actually be quite easy to do.

@sgiehl sgiehl added this to the Priority Backlog (Help wanted) milestone May 16, 2022
@mattab mattab added the Stability For issues that make Matomo more stable and reliable to run for sys admins. label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Stability For issues that make Matomo more stable and reliable to run for sys admins.
Projects
None yet
Development

No branches or pull requests

3 participants