Closed Tantuss closed 7 years ago
+1 running 2.1.9
I can't remove it, either:
bin/magento module:uninstall Mirasvit_Profiler --remove-data --clear-static-content
Mirasvit_Profiler is not an installed composer package
Why / for which version has this issue been closed? Still happening in 2.1.9
When running this command: php -f bin/magento setup:di:compile
I get this error: [Exception] Warning: ltrim() expects parameter 1 to be string, array given in /data/web/magento2/setup/src/Magento/Setup/Module/Di/Compiler/Config/Chain/B ackslashTrim.php on line 61
Tracing it back, it is because the profile is set to enabled. (vendor/magento/framework/App/ObjectManagerFactory.php -> line 150 it sets: 'parameters' => ['backendPrefixes' => ['Zend_CacheBackend', 'Cm_CacheBackend']],)
And that is because: (vendor/magento/framework/Profiler.php -> function enable is called)
This is logical.. So to avoid this issue, I decided to disable profiling: php -f bin/magento mirasvit:profiler:disable
Same error.
Next step, really disable the extension: php bin/magento module:disable Mirasvit_Profiler To be sure: php bin/magento setup:upgrade php bin/magento cache:clean
Still the same error.
Then.. Added a debug_print_backtrace(); in here: vendor/magento/framework/Profiler.php -> public static function enable() (line 182)
0 Magento\Framework\Profiler::enable() called at [,vendor/magento/framework/Profiler.php:139]
1 Magento\Framework\Profiler::add(Magento\Framework\Profiler\Driver\Standard Object ([_stat] => Magento\Framework\Profiler\Driver\Standard\Stat Object ([_timers] => Array ()),[*_outputs] => Array ([0] => Mirasvit\Profiler\Model\Driver\Output\Html Object ()))) called at [,vendor/magento/framework/Profiler.php:337]
2 Magento\Framework\Profiler::applyConfig(Array ([driverConfigs] => Array ([0] => Array ([output] => Mirasvit\Profiler\Model\Driver\Output\Html,[stat] => Magento\Framework\Profiler\Driver\Standard\Stat Object ([_timers] => Array ()),[baseDir] => /Users/jw/Projects/Bluedesk/design-online)),[driverFactory] => Magento\Framework\Profiler\Driver\Factory Object ([_defaultDriverType] => standard,[*_defaultDriverPrefix] => Magento\Framework\Profiler\Driver),[tagFilters] => Array (),[baseDir] => /Users/jw/Projects/Bluedesk/design-online), /Users/jw/Projects/Bluedesk/design-online, ) called at [,vendor/mirasvit/module-profiler/registration.php:10]
3 require(,vendor/mirasvit/module-profiler/registration.php) called at [,vendor/composer/autoload_real.php:71]
4 composerRequirec39cd91b2232e2cae3e4179f9ac543ea(753fed6dc1b400d43e296cf7746c8785, ,vendor/composer/../mirasvit/module-profiler/registration.php) called at [,vendor/composer/autoload_real.php:61]
5 ComposerAutoloaderInitc39cd91b2232e2cae3e4179f9ac543ea::getLoader() called at [,vendor/autoload.php:7]
6 include(,vendor/autoload.php) called at [,app/autoload.php:30]
7 require_once(,app/autoload.php) called at [,app/bootstrap.php:30]
8 require(,app/bootstrap.php) called at [,bin/magento:14]
Conclusion, profiling is switched on, while the extension is disabled and even disabled from Magento configuration.
Current solution is to really remove the extension to prevent the profiler to be enable. But I assume that should not be needed.