0

In Backend When I try to change theme at that time I got this error

Exception #0 (Exception): Notice: Undefined index: default in /home/cloudpanel/htdocs/project/app/code/Codazon/ThemeOptions/Framework/App/Config/Initial.php on line 72

Initial.php

public function getData($scope)
    {

        list($scopeType, $scopeId) = array_pad(explode('|', $scope), 2, null);
        $this->themeId = $this->scopeConfig->getValue(\Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID,$scopeType,$scopeId);
        $cacheKey = self::CACHE_ID.'|theme|'.$this->themeId;
        $data = $this->cache->load($cacheKey);
        if (!$data) {
            $data = $this->reader->read($this->themeId);
            $this->cache->save(serialize($data), $cacheKey);
        } else {
            $data = unserialize($data);
        }
        if($data){
            $this->_data = $data['data'];
            $this->_metadata = $data['metadata'];
        }
        return $this->_data['default'];
    }
  • 1
    You havent display default anywhere in your code, so remove default from $this->data['default'] and set return as only $this->_data; – Rakesh Jesadiya May 1 '17 at 5:26
0

You havent display default anywhere in your code, so remove default from

$this->data['default']

and set return as only

$this->_data;

– Rakesh May 1 at 5:26

this resolved my issue

Your Answer

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

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