Magento 安装出现 dbModel read resource does not implement Zend_Db_Adapter_Abstract Mirasvit_Kb_Model

我们公司由于在开发Magento的过程中购买了大量的插件,以致于在运行代码出现这样那样的问题,下面是问题之二

a:5:{i:0;s:65:"dbModel read resource does not implement Zend_Db_Adapter_Abstract";i:1;s:2269:"#0 D:\www\lollicupStore2\app\code\core\Mage\Core\Model\Resource\Db\Collection\Abstract.php(134): Varien_Data_Collection_Db->setConnection(false)
#1 D:\www\lollicupStore2\app\code\local\Mage\Core\Model\Config.php(1374): Mage_Core_Model_Resource_Db_Collection_Abstract->__construct(Object(Mirasvit_Kb_Model_Resource_Category))
#2 D:\www\lollicupStore2\app\code\local\Mage\Core\Model\Config.php(1406): Mage_Core_Model_Config->getModelInstance('kb_resource/cat...', Object(Mirasvit_Kb_Model_Resource_Category))
#3 D:\www\lollicupStore2\app\Mage.php(491): Mage_Core_Model_Config->getResourceModelInstance('kb/category_col...', Object(Mirasvit_Kb_Model_Resource_Category))
#4 D:\www\lollicupStore2\app\code\core\Mage\Core\Model\Abstract.php(208): Mage::getResourceModel('kb/category_col...', Object(Mirasvit_Kb_Model_Resource_Category))
#5 D:\www\lollicupStore2\app\code\core\Mage\Core\Model\Abstract.php(213): Mage_Core_Model_Abstract->getResourceCollection()
#6 D:\www\lollicupStore2\app\code\local\Mirasvit\Kb\Helper\Data.php(78): Mage_Core_Model_Abstract->getCollection()
#7 D:\www\lollicupStore2\app\code\local\Mirasvit\Kb\Model\Observer.php(70): Mirasvit_Kb_Helper_Data->getRootCategory()
#8 D:\www\lollicupStore2\app\code\core\Mage\Core\Model\App.php(1358): Mirasvit_Kb_Model_Observer->registerUrlRewrite(Object(Varien_Event_Observer))
#9 D:\www\lollicupStore2\app\code\core\Mage\Core\Model\App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Mirasvit_Kb_Model_Observer), 'registerUrlRewr...', Object(Varien_Event_Observer))
#10 D:\www\lollicupStore2\app\Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_fron...', Array)
#11 D:\www\lollicupStore2\app\code\core\Mage\Core\Controller\Varien\Front.php(128): Mage::dispatchEvent('controller_fron...', Array)
#12 D:\www\lollicupStore2\app\code\core\Mage\Core\Model\App.php(764): Mage_Core_Controller_Varien_Front->init()
#13 D:\www\lollicupStore2\app\code\core\Mage\Core\Model\App.php(1113): Mage_Core_Model_App->_initFrontController()
#14 D:\www\lollicupStore2\app\code\core\Mage\Core\Model\App.php(365): Mage_Core_Model_App->getFrontController()
#15 D:\www\lollicupStore2\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#16 D:\www\lollicupStore2\index.php(92): Mage::run('', 'store')
#17 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

解决办法:

在配置文件中找到:D:\www\lollicupStore2\app\etc\modules\Mirasvit_Kb.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Mirasvit_Kb>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mirasvit_MstCore/>
            </depends>
        </Mirasvit_Kb>
    </modules>
</config>

将配置文件的 true 改为false,

<?xml version="1.0"?>
<config>
    <modules>
        <Mirasvit_Kb>
            <active>false</active>
            <codePool>local</codePool>
            <depends>
                <Mirasvit_MstCore/>
            </depends>
        </Mirasvit_Kb>
    </modules>
</config>

在magento 安装完成之后再把 false 改为true

<?xml version="1.0"?>
<config>
    <modules>
        <Mirasvit_Kb>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mirasvit_MstCore/>
            </depends>
        </Mirasvit_Kb>
    </modules>
</config>

Leave a comment

您的电子邮箱地址不会被公开。 必填项已用 * 标注