I have gotten only the configuration value in the Helper file but when I put first my extension and then run setup:install command it gives this error "the default website isn't defined. Set the website and try again."

I have applied the below code.

namespace Vendore\Extension\Helper;
use Magento\Store\Model\StoreManagerInterface;

class Data extends AbstractHelper
    const SECTION_GROUP_FIELD = 'section/group/field';
    protected $storeManagerInterface;

    public function __construct(
        Context $context,
        StoreManagerInterface $storeManagerInterface
    ) {
        $this->storeManagerInterface = $storeManagerInterface;
    public function getConfigvalue()
        return $this->scopeConfig->getValue(self::SECTION_GROUP_FIELD, ScopeInterface::SCOPE_STORE);

Any Solution regarding this Issue?

  • Did you checked is compilation works without your code? Jul 25, 2022 at 9:14


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.