@ziegenberg opened this Issue on July 14th 2021 Contributor

Expected Behavior

When trying to activate a non-existing plugin via console plugin:activate, it should report the not existing plugin in a nice message and do not throw an uncaught exception. Also, it should not be listed in the list of installed plugins afterwards.

Current Behavior

When trying to activate a non-existing plugin via console plugin:activate, it throws an uncaught exception.

php console plugin:activate SecurityInfo2
ERROR [2021-07-14 15:45:55] 477937 Uncaught exception: /opt/matomo/core/Plugin/Manager.php(684): Plugin 'SecurityInfo2' cannot be found in the filesystem in plugins/ directory.

 [Exception] 
 Plugin 'SecurityInfo2' cannot be found in the filesystem in plugins/ directory. 

plugin:activate [plugin1] ... [pluginN]

Also, it's now listed in the list of installed plugins afterwards.

php console plugin:list 
+----------------------+-------------------+---------------+
| Plugin               | Core or optional? | Status        |
+----------------------+-------------------+---------------+
| Diagnostics          | Core              | Activated     |
| Login                | Core              | Activated     |
| CoreAdminHome        | Core              | Activated     |
| UsersManager         | Core              | Activated     |
| SecurityInfo         | Optional          | Activated     |
| SecurityInfo2        | Optional          | Not activated |
| LogViewer            | Optional          | Activated     |
+----------------------+-------------------+---------------+

Possible Solution

Steps to Reproduce (for Bugs)

  1. call php console plugin:activate pluginName for a plugin not in matomo/plugins

Context

Automating plugin installs via console for ansible playbooks.

Your Environment

  • Matomo Version: 4.3.1
  • PHP Version: 8.0
  • Server Operating System: CentOS Linux release 8.4.2105
  • Additionally installed plugins: -
  • Browser: -
  • Operating System: -
@tsteur commented on July 14th 2021 Member

Thanks for creating this issue @ziegenberg 👍

This Issue was closed on July 19th 2021
Powered by GitHub Issue Mirror