ZF2 – get was unable to fetch or create an instance for getAlbumTable-Collection of common programming errors
I used the getAlbumTable in the title since the problem I’m facing is based on the Zend Album Tutorial, might be easier for others having a similar problem to find. All I’ve done is rename Album to “Champrallies”.
My error:
Zend\Mvc\Controller\PluginManager::get was unable to fetch or create an instance for getChampralliesTable
What I’m trying to do is execute a function from a second Model I’ve created. I can execute from the ‘original’ model no problem AlbumTable or in my case ChampionshipTable. I’m trying to get data from a second table, but within the same module. The second table is called “champ_rallies” and the Model files are Champrallies.php and ChampralliesTable.php.
Changing this part in my controller
'champRallies' => $this->getChampralliesTable()->fetchAll(),
to
'champRallies' => $this->getChampionshipTable()->fetchAll(),
means the error message disappears. So my first thought is that there is something wrong with namespaces, or module.php. (Forgive me, I’m fairly new at all this)
Module.php
Originally posted 2013-11-10 00:14:26.