0

I am getting "Incorrect theme identification key" while creating custom cron job. Magento version is 2.4.2.

Error in log file:

[2021-06-18 00:50:38] main.INFO: Cron Job update_qty_leatherhides is run [] [] [2021-06-18 00:50:38] main.ERROR: Cron Job update_qty_leatherhides has an error: Incorrect theme identification key. Statistics: {"sum":0,"count":1,"realmem":0,"emalloc":0,"realmem_start":208142336,"emalloc_start":197509928} [] [] [2021-06-18 00:50:38] main.CRITICAL: Incorrect theme identification key {"exception":"[object] (InvalidArgumentException(code: 0): Incorrect theme identification key at /chroot/home/a5ad8123/0e80a7b082.nxcli.net/html/vendor/magento/framework/View/Design/Theme/FlyweightFactory.php:62)"} []

Can any one help me to resolve this issue?

0

Insert into theme VALUES (4, 1, 'Magento/luma', 'Magento Luma Cron', NULL, 0, 'crontab', 0, 'Magento/luma');

0

I too came across this issue but the description of the error isn't entirely helpful. I had these errors in my cron_schedule table for cron jobs I had built into a controller class. Looks like Magento 2.4.2 doesn't like you doing that so I moved the code to be in its own class (not extending from anything) and voila errors gone.

0

Magento classes used to define crons, should not be extended from any other class such as \Magento\Framework\App\Action\Action.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy