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

Fix console diagnostics:run error when GeoIp2 is disabled #18456

Closed
bigahuna opened this issue Dec 6, 2021 · 2 comments · Fixed by #18461
Closed

Fix console diagnostics:run error when GeoIp2 is disabled #18456

bigahuna opened this issue Dec 6, 2021 · 2 comments · Fixed by #18461
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@bigahuna
Copy link

bigahuna commented Dec 6, 2021

Expected Behavior

When calling php console diagnostics:run we expect a summary of the system status.

Current Behavior

When calling php console diagnostics:run The following error shows up:

ERROR [2021-12-06 11:14:01] 24912 Uncaught exception: Error: Call to undefined function Piwik\piwik_fix_lbrace() in /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/Diagnostic/DiagnosticResult.php:74 Stack trace: #0 /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/Diagnostic/MatomoInformational.php(36): Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResult::informationalResult('Matomo Version', '4.6.1') #1 /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/DiagnosticService.php(68): Piwik\Plugins\Diagnostics\Diagnostic\MatomoInformational->execute() #2 /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/DiagnosticService.php(55): Piwik\Plugins\Diagnostics\DiagnosticService->run(Array) #3 /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/Commands/Run.php(41): Piwik\Plugins\Diagnostics\DiagnosticService->runDiagnostics() #4 /var/www/xyz.de/typo3/public/analyse/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Piwik\Plugins\Diagnostics\Commands\Run->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #5 /var/www/xyz.de/typo3/public/analyse/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #6 /var/www/xyz.de/typo3/public/analyse/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Piwik\Plugins\Diagnostics\Commands\Run), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #7 [internal function]: Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #8 /var/www/xyz.de/typo3/public/analyse/core/Console.php(130): call_user_func(Array, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #9 /var/www/xyz.de/typo3/public/analyse/core/Access.php(670): Piwik\Console->Piwik\{closure}() #10 /var/www/xyz.de/typo3/public/analyse/core/Console.php(131): Piwik\Access::doAsSuperUser(Object(Closure)) #11 /var/www/xyz.de/typo3/public/analyse/core/Console.php(82): Piwik\Console->doRunImpl(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/xyz.de/typo3/public/analyse/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/xyz.de/typo3/public/analyse/console(32): Symfony\Component\Console\Application->run() #14 {main} Uncaught exception in /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/Diagnostic/DiagnosticResult.php line 74: Call to undefined function Piwik\piwik_fix_lbrace()

The Systemcheck in the browser (/index.php?module=Installation&action=systemCheckPage) runs just fine and reports no errors.

This error did not happen with Matomo 3 or 4.5. It startet after the Update from 4.5.0 to 4.6.1

Steps to Reproduce (for Bugs)

  1. open a terminal
  2. go into matomo directory
  3. run php console diagnostics:run

Alterantively open the admin homepage (/index.php?module=CoreAdminHome&action=home&idSite=1&period=range&date=previous30). Here the "System Check" widget shows the same error as described above (Call to undefined function Piwik\piwik_fix_lbrace());

Your Environment

  • Matomo Version: 4.6.1
  • PHP Version: 7.4.25
  • Server Operating System: CentOS Linux release 7.9.2009 (Core)
  • Browser: Chrome (96.0.4664.55), Safari (15.1 )
  • Operating System: MacOS 11.6.1
@bigahuna bigahuna added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Dec 6, 2021
@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Dec 6, 2021
@tsteur tsteur added this to the 4.6.2 milestone Dec 6, 2021
@tsteur
Copy link
Member

tsteur commented Dec 6, 2021

Thanks for this @bigahuna . It can be reproduced eg when GeoIP2 is disabled. Is this the case for you maybe?

@tsteur tsteur modified the milestones: 4.6.2, 4.7.0 Dec 6, 2021
@bigahuna
Copy link
Author

bigahuna commented Dec 7, 2021

Thanks for this @bigahuna . It can be reproduced eg when GeoIP2 is disabled. Is this the case for you maybe?

Yes, GeoIP2 is disabled

@sgiehl sgiehl self-assigned this Dec 7, 2021
@justinvelluppillai justinvelluppillai changed the title Call to undefined function Piwik\piwik_fix_lbrace() in console diagnostics:run Fix console diagnostics:run error when GeoIp2 is disabled Dec 7, 2021
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. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants