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

activating non-existing plugin via console plugin:activate results in uncaught exception and plugin is listed as installed afterwards #17770

Closed
ziegenberg opened this issue Jul 14, 2021 · 1 comment · Fixed by #17772
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@ziegenberg
Copy link
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: -
@ziegenberg ziegenberg added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Jul 14, 2021
@tsteur tsteur 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 Jul 14, 2021
@tsteur
Copy link
Member

tsteur commented Jul 14, 2021

Thanks for creating this issue @ziegenberg 👍

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants