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

Show an error message in case we deactivate a plugin because of missing dependencies #9676

Merged
merged 1 commit into from Feb 13, 2016

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Feb 2, 2016

refs #4485

See #4485 (comment) we may silently disable / deactivate plugins in case the requirements of a plugin are no longer met. In this case we do now simply output a trivial error message by triggering a notification.

The notification may or may not be seen depending on if the plugin was disabled automatically while a UI page was requested. Also it may be printed to any user, or anonymous user. However this is rather very unlikely. Problem is we do not know at the time of checking for these conditions whether someone is logged in etc. Also sessions won't be started at that time so we cannot persist it under circumstances.

Initially it was not possible to trigger a notification there at all since the session was not loaded at that time of bootstrapping Piwik. I changed the notification manager to only store persistent notifications in session from now on since all others don't need to be stored there (non persistent notifications get deleted at some point anyway). Also in case a session becomes available later, there is a chance that we may copy a notification from the local cache into the session to make sure it will be displayed in the UI.

We also make sure notifications are stored in sessions.

@tsteur tsteur added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Needs Review PRs that need a code review labels Feb 2, 2016
@mattab mattab modified the milestones: 2.16.1, 2.16.x Feb 2, 2016
@tsteur tsteur force-pushed the notification_deactivate_plugin branch from 30ce021 to 150490d Compare February 13, 2016 08:49
@tsteur tsteur force-pushed the notification_deactivate_plugin branch 2 times, most recently from f9dd617 to be4ff3c Compare February 13, 2016 09:39
tsteur added a commit that referenced this pull request Feb 13, 2016
Show an error message in case we deactivate a plugin because of missing dependencies
@tsteur tsteur merged commit cbd47fe into master Feb 13, 2016
@tsteur tsteur deleted the notification_deactivate_plugin branch February 13, 2016 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants