- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2019
12:17 PM
03-16-2019
12:17 PM
Class setAreaCode does not exist
this code, witch disable of activate tablerate, was working in magento 2.2.7, afther update to 2.3 the code still works in developer mode but afhter di/compile it give me this error : Class setAreaCode does not exist
this is the code someone has any idea to resolve this?
use Magento\Framework\App\Bootstrap; require __DIR__ . '/../../../../../app/bootstrap.php'; $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); $objectManager = $bootstrap->getObjectManager(); $objectManager->get(\Magento\Framework\App\State::class)->setAreaCode('adminhtml'); $objectManager->create('\Magento\Framework\App\Config\Storage\WriterInterface')->save('carriers/tablerate/active', 1, 'default', 0); $objectManager->create('\Magento\Framework\App\Config\Storage\WriterInterface')->save('carriers/tablerate/active', 1, 'websites', 1);
Labels:
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2019
11:53 PM
03-17-2019
11:53 PM
Re: Class setAreaCode does not exist
Hi @reneeetje
I suggest you to run these two commands in Magento DB.
Before run these command I would recommend to take a database backup.
UPDATE flag SET flag_data = NULL WHERE flag_code = 'system_config_snapshot'; UPDATE flag SET flag_data = NULL WHERE flag_code = 'config_hash';
I hope it will help you.
Thanks
--
If my answer is useful, please Accept as Solution & give Kudos