[TYPO3-mvc] Beware using Repository or Model in extension name

Steffen Kamper info at sk-typo3.de
Wed Jul 29 16:13:29 CEST 2009


Hi,

Sebastian Gebhard schrieb:
> Now that you say that, i remember I had the same Problem with my car 
> project, when I tried to handle the car models (like "Golf" or "A3").
> That's the disadvantage of convention over configuration ;)
> Good luck for your further work today!

i think now i did all errors possible :)
After successful renaming (always missed some parts in TCA) BE works 
perfect again.

But with simple fetching data:
$vhLibrary = 
t3lib_div::makeInstance('Tx_ViewhelperLibrary_Domain_Model_CodeRepository'); 

$codes = $vhLibrary->findAll();

i run in the next ones.

In the model i had a property with one fe_user
* @var Tx_Extbase_Domain_Model_FrontendUser
protected $contributor;

public function setContributor(Tx_Extbase_Domain_Model_FrontendUser 
$contributor) {
    $this->contributor = $contributor;
}

crashes with:
  Fatal error: Cannot redeclare 
Tx_ViewhelperLibrary_Domain_Model_Code::setContributor() in ...

after commenting out property i get:
Warning: class_implements() [function.class-implements]: object or 
string expected in 
C:\xampp\htdocs\t3\home\typo3\ext\extbase\Classes\Persistence\Mapper\DataMapper.php 
on line 142

what shall i say, my day? Better going into a coffeeshop?

vg Steffen


More information about the TYPO3-project-typo3v4mvc mailing list