@Findus23 opened this Issue on February 16th 2020 Member

quite low priority, but I wanted to write it down just in case I stumble across it again in the future.
(and maybe the same is true for other error messages and it confuses user)

When developing Matomo doesn't have write permission to plugins/. This doesn't matter as it isn't needed for things apart from the marketplace.

When one tries to download something from the marketplace this error message appears rightfully:

grafik

The issue is that there is no way to get rid of the notification. Pressing the x only closes it with JS, but as it is rendered by Twig it will reappear on every page even when it doesn't matter anymore.

Adding a static::$session->unsetAll(); to
https://github.com/matomo-org/matomo/blob/b16a791aa3650d85af829156129c2bd44c7cb075/core/Notification/Manager.php#L191-L202

removes it from the session and gets finally rid of the message (ending the session in another way would also work).

@sgiehl commented on February 25th 2020 Member

maybe related to #15498

@Findus23 commented on February 25th 2020 Member

@sgiehl That sounds like the same general issue (notifications in the session don't disappear)

@Findus23 commented on May 24th 2020 Member

https://github.com/matomo-org/matomo/issues/12934 is also caused by the same issue.

@tsteur commented on April 20th 2021 Member

To fix this problem we want to fix the generic problem that a persistent notification only seems to disappear when logging out and logging in.

You can reproduce this by applying this change

diff --git a/plugins/CorePluginsAdmin/PluginInstaller.php b/plugins/CorePluginsAdmin/PluginInstaller.php
index 4619ecca9f..11f10a1ac6 100644
--- a/plugins/CorePluginsAdmin/PluginInstaller.php
+++ b/plugins/CorePluginsAdmin/PluginInstaller.php
@@ -52,6 +52,7 @@ class PluginInstaller

     public function installOrUpdatePluginFromMarketplace($pluginName)
     {
+        throw new \Exception('foo');
         $this->checkMarketplaceIsEnabled();

         $this->pluginName = $pluginName;

Then go to marketplace, and try to install a plugin. Then go back for example to the marketplace page or the Platform -> API page in the Matomo admin.

The notification will always appear again, even if you click on the "x". It seems it is supposed to call a method CoreHome controller markNotificationAsRead action when clicking on the "x" and then not appear anymore. However, it doesn't look like the notification angular component is actually sending that request maybe.

@tsteur commented on April 20th 2021 Member

image
problem is there's no notificationId defined in the angularjs component. It's likely only set in the scope.

Powered by GitHub Issue Mirror