我正嘗試使用自定義模塊創建自定義表。我一直在關注Alan Storm's article創建一個自定義表Magento安裝腳本永遠不會運行
這是我的文件夾結構
CM
Tablecreation
etc >> config.xml (has 1.6.0.0 as the version mentioned)
Helper >> Data.php
controllers >> IndexController.php
Model
Actualtable.php
Mysql4
Actualtable.php
Resource
Mysql4
Setup.php
sql
tablecreation_setup
install-1.6.0.0.php
這是我的config.xml文件。
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<CM_Tablecreation>
<version>1.6.0.0</version>
</CM_Tablecreation>
</modules>
<frontend>
<routers>
<tablecreation>
<use>standard</use>
<args>
<module>CM_Tablecreation</module>
<frontName>tablecreation</frontName>
</args>
</tablecreation>
</routers>
</frontend>
<global>
<models>
<tablecreation>
<class>CM_Tablecreation_Model</class>
<resourceModel>tablecreation_mysql4</resourceModel>
</tablecreation>
<tablecreation_mysql4>
<class>CM_Tablecreation_Model_Mysql4</class>
<entities>
<actualtable>
<table>actual_table</table>
</actualtable>
</entities>
</tablecreation_mysql4>
</models>
<resources>
<tablecreation_setup>
<setup>
<module>CM_Tablecreation</module>
<class>CM_Tablecreation_Model_Resource_Mysql4_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</tablecreation_setup>
<tablecreation_write>
<connection>
<use>core_write</use>
</connection>
</tablecreation_write>
<tablecreation_read>
<connection>
<use>core_read</use>
</connection>
</tablecreation_read>
</resources>
<helpers>
<tablecreation>
<class>CM_Tablecreation_Helper</class>
</tablecreation>
</helpers>
</global>
</config>
這是我得到的每一個
a:5:{i:0;s:69:"/home/dev/public_html/app/code///sql/tablecreation_setup not found";i:1;s:818:"#0 /home/dev/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.0.0')
我通過把嘗試捕捉與應用程序/代碼/核心/法師/核心/資源/ Setup.php作爲異常消息試過調試時間錯誤在這個主題的一些以前的類似問題中提出,但沒有成功
我的模塊甚至沒有列入core_resource表中。即使一些事情如此,表格肯定也不會被創建。
我也有這種情況時,它確實在core_resource表中列出,但如果我從表中刪除我的模塊的記錄(再次運行安裝腳本),然後嘗試刷新我的網站的任何頁面,我再次得到錯誤頁面打開我發現同樣的錯誤的報告。
基本上,我在網上的任何文章,我都被卡在這個相同的錯誤。請幫我解釋一下這個錯誤以及導致它的原因。如果有人能夠提出解決問題的方法,那麼也許也是如此。
許多在此先感謝。
將您的config.xml粘貼到這裏 –