I have been working on a simple module and have been stuck with the error
Can't retrieve entity config
for too long. I am assuming that this is to do with the way I have set my config.xml files up?
The module is to extract information from a table that I have put in to the database. I guessed this would be an easy and basic project for me but i'm really struggling.
My two questions are
- How should I go about de-bugging projects in Magento (many of my
problems have been with the xml). So far I have been using
var_dump()
anddie()
commands, is there a better way? - How do I resolve this problem? (I have added my xml code below)
namespace/module/etc/config.xml
<global>
<models>
<prefcentre>
<class>Ps_Prefcentre_Model</class>
<resourceModel>prefcentre_mysql4</resourceModel>
</prefcentre>
<prefcentre_mysql4>
<class>Ps_Prefcentre_Model_Mysql4</class>
<entities>
<prefcentre>
<table>prefcentre</table>
</prefcentre>
</entities>
</prefcentre_mysql4>
</models>
<resources>
<prefcentre_write>
<connection>
<use>core_write</use>
</connection>
</prefcentre_write>
<prefcentre_read>
<connection>
<use>core_read</use>
</connection>
</prefcentre_read>
</resources>
</global>
======EDIT=====
Cache is disabled.
class Ps_Prefcentre_Model_Mysql4_Preferences
extends Mage_Core_Model_Mysql4_Abstract
{
protected function _construct()
{
$this->_init('prefcentre/preferences', 'prefcentre_id');
}
}