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

Running "matomo:install" without "--force" fails: "getHelper can not be used" #41

Open
mbrodala opened this issue Oct 8, 2024 · 1 comment · May be fixed by #42
Open

Running "matomo:install" without "--force" fails: "getHelper can not be used" #41

mbrodala opened this issue Oct 8, 2024 · 1 comment · May be fixed by #42

Comments

@mbrodala
Copy link

mbrodala commented Oct 8, 2024

The matomo:install command uses the internal getHelper() API which is forbidden since Matomo 5.0.0:

$helper = $this->getHelper('question');

The error:

$ ./console matomo:install ... -vvv
ERROR     [2024-10-08 12:43:28] 53  Uncaught exception: /var/www/html/core/Plugin/ConsoleCommand.php(349): getHelper can not be used [Query: , CLI mode: 1]

In ConsoleCommand.php line 349:
                             
  [LogicException]           
  getHelper can not be used  
                             

Exception trace:
  at /var/www/html/core/Plugin/ConsoleCommand.php:349
 Piwik\Plugin\ConsoleCommand->getHelper() at /var/www/html/plugins/ExtraTools/Commands/InstallMatomo.php:221
 Piwik\Plugins\ExtraTools\Commands\InstallMatomo->doExecute() at /var/www/html/core/Plugin/ConsoleCommand.php:109
 Piwik\Plugin\ConsoleCommand->execute() at /var/www/html/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at /var/www/html/core/Plugin/ConsoleCommand.php:124
 Piwik\Plugin\ConsoleCommand->run() at /var/www/html/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at /var/www/html/core/Console.php:113
 Piwik\Console->originDoRun() at n/a:n/a
 call_user_func() at /var/www/html/core/Console.php:152
 Piwik\Console->Piwik\{closure}() at /var/www/html/core/Access.php:672
 Piwik\Access::doAsSuperUser() at /var/www/html/core/Console.php:153
 Piwik\Console->doRunImpl() at /var/www/html/core/Console.php:92
 Piwik\Console->doRun() at /var/www/html/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /var/www/html/console:32

See matomo-org/matomo#20596

@mikkeschiren
Copy link
Contributor

Thanks for the report - I will look into it, and pull requests are welcome!

mbrodala added a commit to mbrodala/Matomo-Plugin-ExtraTools that referenced this issue Oct 11, 2024
@mbrodala mbrodala linked a pull request Oct 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants