【发布时间】:2013-08-26 19:44:12
【问题描述】:
我的安装程序脚本没有运行。
/app/etc/modules/Starmall_Salesorder.xml
<?xml version="1.0"?>
<config>
<modules>
<Starmall_Salesorder>
<active>true</active>
<version>0.1.0</version>
<codePool>local</codePool>
</Starmall_Salesorder>
</modules>
配置.xml
<modules>
<Starmall_Salesorder>
<version>0.1.0</version>
</Starmall_Salesorder>
</modules>
...
<resources>
<starmall_salesorder_setup>
<setup>
<module>Starmall_Salesorder</module>
</setup>
</starmall_salesorder_setup>
</resources>
...
/app/code/local/Starmall/Salesorder/sql/starmall_salesorder_setup/mysql4-install-0.1.0.php:
<?php echo 'Running installer: '.get_class($this)."\n <br /> \n";
die("Exit for now");
加载页面时,我看不到测试输出。core_resource 中没有此模块的行。
在 /var/log 中看不到错误
为什么这个安装程序不运行?
我在app/code/core/Mage/Core/Model/Resource/Setup.php中添加了调试行
在这个函数中它没有到达这里_installResourceDb($newVersion)
protected function _installResourceDb($newVersion)
{
Mage::log("this line is not added to log file");
$oldVersion = $this->_modifyResourceDb(self::TYPE_DB_INSTALL, '', $newVersion);
$this->_modifyResourceDb(self::TYPE_DB_UPGRADE, $oldVersion, $newVersion);
$this->_getResource()->setDbVersion($this->_resourceName, $newVersion);
return $this;
}
【问题讨论】:
-
1) 验证配置缓存是否已禁用或至少已被清除。 2) 发布你的模块声明文件(位于app/etc/modules/)。
-
我已添加我的
/app/etc/modules/Starmall_Salesorder.xml我已禁用缓存并删除以确保 /var 文件夹
标签: magento magento-1.7