0

Do some of you out there know how to solve the Exception "Invalid scope type in Magento 2? Please advise, thanks in advance.

the exception code:

InvalidArgumentException: Invalid scope type 'welcome' in ../vendor/magento/framework/App/ScopeResolverPool.php:40 Stack trace: #0 ../vendor/magento/framework/App/Config/ScopeCodeResolver.php(48): Magento\Framework\App\ScopeResolverPool->get() #1 ../vendor/magento/framework/App/Config.php(69): Magento\Framework\App\Config\ScopeCodeResolver->resolve() #2 ..generated/code/Magento/Framework/App/Config/Interceptor.php(23): Magento\Framework\App\Config->getValue() #3 ../vendor/magento/framework/Session/Config.php(195): Magento\Framework\App\Config\Interceptor->getValue() #4 ../vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\Framework\Session\Config->__construct() #5 ../vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() #6 ../vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() #7 ../vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): Magento\Framework\ObjectManager\ObjectManager->get() #8 ../vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument() #9 ../vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument() #10 ../vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime() #11 ../vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments() #12

and many more ...

Best regards Chien V. Tran

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Nov 8, 2021 at 15:47

2 Answers 2

0

From your error, /App/Config mostly related to the Magento store configuration.

Check your config.xml or system.xml to see if you input invalid scope value. Normally Magento support scope like store/website/default , but not "welcome".

1
  • Thank you Leo, I'll be back after having fixed this error.
    – iivo
    Nov 9, 2021 at 10:08
0
$this->scopeConfig->getValue(
    self::CONFIG_PATH,
    ScopeInterface::SCOPE_STORE,
    $storeId
)

This is the code to get config values from different scopes. You like either overwrote the ScopeInterface::SCOPE_STORE, passed something else, or didn't pass that in at all leaving only the two arguments.

The second argument is telling that function what the third argument is supposed to be interpeted as

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.