[TYPO3-mvc] Fatal error: Cannot redeclare class with sys_category 6.2beta2

Rob De Vries dev at rob-ot.be
Sat Nov 30 13:48:35 CET 2013


Hey,

I have a very simple extbase ext. that I have extended with sys_category. 
The only thing it does is to give a list of calendar items with their category.

When i leave out the categorys, all goes well.
but when i include them in my model like this:

 /**
* Categories
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
*/
protected $categories;


i get : " Cannot redeclare class TYPO3\Mwh\Domain\Model\Calender in /opt/local/apache2/htdocs/test62/typo3conf/ext/mwh/Classes/Domain/Model/Calender.php on line 34"

When i look at the Call Stack I see that the model is indeed called twice:
64	0.2341	9431504	require_once( '/opt/local/apache2/htdocs/test62/typo3temp/Cache/Code/cache_classes/tx_mwh_domain_model_calender.php' )	../ClassLoaderBackend.php:182

65	0.2342	9431792	require( '/opt/local/apache2/htdocs/test62/typo3conf/ext/mwh/Classes/Domain/Model/Calender.php' )	../tx_mwh_domain_model_calender.php:1


When i remove <?php require '/opt/local/apache2/htdocs/test62/typo3conf/ext/mwh/Classes/domain/model/calender.php';
from typo3temp/Cache/Code/cache_classes/tx_mwh_domain_model_calender.php
all works as expected.

Anyone who knows what's going on here?
how to solve it or if it is a bug i have to report?

Tnx
Rob


More information about the TYPO3-project-typo3v4mvc mailing list