Hello ,
i am getting this error in exception.log
#18 {main} {"exception":"[object] (Error(code: 0): Call to a member function getCode() on null at /home/uraircon/public_html/vendor/magento/module-store/App/Action/Plugin/Context.$
Hello @anandimhere
Check your database to ensure the store table has valid data:
Open your database using a tool like phpMyAdmin or MySQL CLI.
SELECT * FROM store;
Hope it helps !
If you find our reply helpful, please give us kudos.
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Location: 150 King St. W. Toronto, ON M5H 1J9
Hello @anandimhere, To resolve this you should follow this steps.
Open the exception.log or system.log file in the var/log/ directory of your Magento installation.
Look for the complete stack trace to identify what triggered the error (e.g., a custom module or third-party extension).
Verify that all stores and store views are properly configured in the Magento admin panel:
Admin Panel > Stores > All Stores.
Ensure that no store view is disabled or has incomplete data (e.g., missing store codes).
Navigate to the file /vendor/magento/module-store/App/Action/Plugin/Context.php
Check if getStore() is returning null. Add a check like this:
if ($this->storeManager->getStore()) { $storeCode = $this->storeManager->getStore()->getCode(); } else { $storeCode = 'default'; // Or handle it appropriately }
If you aren't already in developer mode, enable it to get more detailed error messages:
php bin/magento deploy:mode:set developer
If the issue will be resolved, Click Kudos & Accept as a Solution.