Title
Preconditions
- Magento 2.4.0
- PHP 7.4
- MySQL 5.7
- CronScheduler 1.0.6 with patch from PR #21
Steps to reproduce
- Set up a Magento store with multiple themes
Expected result
- No error should be logged
Actual result
- "Invalid theme key" error is written to
exception.log
Additional Information
I created an extension with an around plug-in on the method throwing the error, and received this stack trace:
{
"trace": [
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Interception/Interceptor.php",
"line": 58,
"function": "create",
"class": "Magento\\Framework\\View\\Design\\Theme\\FlyweightFactory",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Interception/Interceptor.php",
"line": 138,
"function": "___callParent",
"class": "Magento\\Framework\\View\\Design\\Theme\\FlyweightFactory\\Interceptor",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/app/code/Wagento/ThemeErrorDebug/Plugin/Framework/View/Design/Theme/FlyweightFactoryPlugin.php",
"line": 22,
"function": "Magento\\Framework\\Interception\\{closure}",
"class": "Magento\\Framework\\View\\Design\\Theme\\FlyweightFactory\\Interceptor",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Interception/Interceptor.php",
"line": 135,
"function": "aroundCreate",
"class": "Wagento\\ThemeErrorDebug\\Plugin\\Framework\\View\\Design\\Theme\\FlyweightFactoryPlugin",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Interception/Interceptor.php",
"line": 153,
"function": "Magento\\Framework\\Interception\\{closure}",
"class": "Magento\\Framework\\View\\Design\\Theme\\FlyweightFactory\\Interceptor",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/generated/code/Magento/Framework/View/Design/Theme/FlyweightFactory/Interceptor.php",
"line": 26,
"function": "___callPlugins",
"class": "Magento\\Framework\\View\\Design\\Theme\\FlyweightFactory\\Interceptor",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/module-theme/Model/View/Design.php",
"line": 148,
"function": "create",
"class": "Magento\\Framework\\View\\Design\\Theme\\FlyweightFactory\\Interceptor",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/module-theme/Model/View/Design.php",
"line": 212,
"function": "setDesignTheme",
"class": "Magento\\Theme\\Model\\View\\Design",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/App/Area.php",
"line": 261,
"function": "setDefaultDesignTheme",
"class": "Magento\\Theme\\Model\\View\\Design",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/App/Area.php",
"line": 219,
"function": "_initDesign",
"class": "Magento\\Framework\\App\\Area",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/App/Area.php",
"line": 143,
"function": "_loadPart",
"class": "Magento\\Framework\\App\\Area",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/View/DesignLoader.php",
"line": 54,
"function": "load",
"class": "Magento\\Framework\\App\\Area",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/App/Action/Plugin/LoadDesignPlugin.php",
"line": 53,
"function": "load",
"class": "Magento\\Framework\\View\\DesignLoader",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Interception/Interceptor.php",
"line": 121,
"function": "beforeExecute",
"class": "Magento\\Framework\\App\\Action\\Plugin\\LoadDesignPlugin",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Interception/Interceptor.php",
"line": 153,
"function": "Magento\\Framework\\Interception\\{closure}",
"class": "KiwiCommerce\\CronScheduler\\Controller\\Adminhtml\\Cron\\LongJobChecker\\Interceptor",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/generated/code/KiwiCommerce/CronScheduler/Controller/Adminhtml/Cron/LongJobChecker/Interceptor.php",
"line": 26,
"function": "___callPlugins",
"class": "KiwiCommerce\\CronScheduler\\Controller\\Adminhtml\\Cron\\LongJobChecker\\Interceptor",
"type": "->"
},
{
"function": "execute",
"class": "KiwiCommerce\\CronScheduler\\Controller\\Adminhtml\\Cron\\LongJobChecker\\Interceptor",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/kiwicommerce/module-cron-scheduler/Observer/ProcessCronQueueObserver.php",
"line": 151,
"function": "call_user_func_array"
},
{
"file": "/var/www/releases/20200814220155/vendor/kiwicommerce/module-cron-scheduler/Observer/ProcessCronQueueObserver.php",
"line": 603,
"function": "_runJob",
"class": "KiwiCommerce\\CronScheduler\\Observer\\ProcessCronQueueObserver",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/kiwicommerce/module-cron-scheduler/Observer/ProcessCronQueueObserver.php",
"line": 370,
"function": "processPendingJobs",
"class": "KiwiCommerce\\CronScheduler\\Observer\\ProcessCronQueueObserver",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/kiwicommerce/module-cron-scheduler/Observer/ProcessCronQueueObserver.php",
"line": 545,
"function": "KiwiCommerce\\CronScheduler\\Observer\\{closure}",
"class": "KiwiCommerce\\CronScheduler\\Observer\\ProcessCronQueueObserver",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/kiwicommerce/module-cron-scheduler/Observer/ProcessCronQueueObserver.php",
"line": 371,
"function": "lockGroup",
"class": "KiwiCommerce\\CronScheduler\\Observer\\ProcessCronQueueObserver",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Event/Invoker/InvokerDefault.php",
"line": 88,
"function": "execute",
"class": "KiwiCommerce\\CronScheduler\\Observer\\ProcessCronQueueObserver",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Event/Invoker/InvokerDefault.php",
"line": 74,
"function": "_callObserverMethod",
"class": "Magento\\Framework\\Event\\Invoker\\InvokerDefault",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/module-staging/Model/Event/Manager.php",
"line": 97,
"function": "dispatch",
"class": "Magento\\Framework\\Event\\Invoker\\InvokerDefault",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/generated/code/Magento/Staging/Model/Event/Manager/Proxy.php",
"line": 95,
"function": "dispatch",
"class": "Magento\\Staging\\Model\\Event\\Manager",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/App/Cron.php",
"line": 86,
"function": "dispatch",
"class": "Magento\\Staging\\Model\\Event\\Manager\\Proxy",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/module-cron/Console/Command/CronCommand.php",
"line": 117,
"function": "launch",
"class": "Magento\\Framework\\App\\Cron",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/symfony/console/Command/Command.php",
"line": 255,
"function": "execute",
"class": "Magento\\Cron\\Console\\Command\\CronCommand",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Interception/Interceptor.php",
"line": 58,
"function": "run",
"class": "Symfony\\Component\\Console\\Command\\Command",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Interception/Interceptor.php",
"line": 138,
"function": "___callParent",
"class": "Magento\\Cron\\Console\\Command\\CronCommand\\Interceptor",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Interception/Interceptor.php",
"line": 153,
"function": "Magento\\Framework\\Interception\\{closure}",
"class": "Magento\\Cron\\Console\\Command\\CronCommand\\Interceptor",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/generated/code/Magento/Cron/Console/Command/CronCommand/Interceptor.php",
"line": 26,
"function": "___callPlugins",
"class": "Magento\\Cron\\Console\\Command\\CronCommand\\Interceptor",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/symfony/console/Application.php",
"line": 1000,
"function": "run",
"class": "Magento\\Cron\\Console\\Command\\CronCommand\\Interceptor",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/symfony/console/Application.php",
"line": 271,
"function": "doRunCommand",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/magento/framework/Console/Cli.php",
"line": 115,
"function": "doRun",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/vendor/symfony/console/Application.php",
"line": 147,
"function": "doRun",
"class": "Magento\\Framework\\Console\\Cli",
"type": "->"
},
{
"file": "/var/www/releases/20200814220155/bin/magento",
"line": 23,
"function": "run",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
}
]
}
it seems that when LongJobChecker runs, an empty theme key gets passed somewhere, causing this error to be thrown. It could have something to do with the fact that it extends from \Magento\Backend\App\Action
.