[TYPO3-mvc] Abstract Classes and the DB

Zalán Somogyváry zalan at gmx.net
Mon May 16 00:31:19 CEST 2011


Hallo Liste,

I'm struggling with this problem since than. I can't make a repo on an AbstractMediaItem with STI. My setup.txt is as follows (comments added afterwards):

plugin.tx_extbase.persistence.classes {
	Tx_TuBaCore_Domain_Model_MediaItem { // this is an abstract super class
		subclasses {
            		MediaFile = Tx_TuBaCore_Domain_Model_MediaFile
        	}
	}
	Tx_TuBaCore_Domain_Model_MediaFile { // this is another one.
		subclasses {
			Image = Tx_TuBaCore_Domain_Model_Image
		}
	}
	Tx_TuBaCore_Domain_Model_Image { // this is the concrete class.
		mapping {
			tableName = tx_tubacore_domain_model_mediaitem
			recordType = Tx_TuBaCore_Domain_Model_Image
			columns {
				uri.mapOnProperty = path
			}
		}
	}
}

The error I get is:
Fatal error: Cannot instantiate abstract class Tx_TuBaCore_Domain_Model_MediaItem in /path/to/typo/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php on line 224
1 0.0004 338708 {main}( ) ../index.php:0
2 0.0017 481052 require('/path/to/typo/typo3/sysext/cms/tslib/index_ts.php')
../index.php:84
3 0.3894 19360256 tslib_fe->INTincScript( ) ../index_ts.php:465
4 0.3895 19360416 tslib_fe->INTincScript_process( ) ../class.tslib_fe.php:3189
5 0.3898 19415768 tslib_cObj->USER( ) ../class.tslib_fe.php:3250  
6 0.3899 19415812 tslib_content_User->render( ) ../class.tslib_content.php:922
7 0.3899 19415900 tslib_cObj->callUserFunction( ) ../class.tslib_content_user.php:51
8 0.3899 19417268 call_user_func_array ( ) ../class.tslib_content.php:6332 
9 0.3899 19417284 Tx_Extbase_Core_Bootstrap->run( ) ../class.tslib_content.php:0
10 0.3923 19417960 Tx_Extbase_MVC_Web_FrontendRequestHandler->handleRequest( ) ../Bootstrap.php:247 
11 0.3945 19464344 Tx_Extbase_MVC_Dispatcher->dispatch( ) ../FrontendRequestHandler.php:72
12 0.4001 19672808 Tx_Extbase_MVC_Controller_ActionController->processRequest( ) ../Dispatcher.php:82
13 0.4090 19970208 Tx_Extbase_MVC_Controller_ActionController->callActionMethod( ) ../ActionController.php:155 
14 0.4090 19970584 call_user_func_array ( ) ../ActionController.php:252 
15 0.4090 19970716 Tx_TuBaCore_Controller_ListController->listAction( ) ../ActionController.php:0 
16 0.4141 20173204 Tx_Extbase_Persistence_QueryResult->rewind( ) ../QueryResult.php:0
17 0.4141 20173204 Tx_Extbase_Persistence_QueryResult->initialize( ) ../QueryResult.php:247 
18 0.4532 21215504 Tx_Extbase_Persistence_Mapper_DataMapper->map( ) ../QueryResult.php:106 
19 0.4533 21215780 Tx_Extbase_Persistence_Mapper_DataMapper->mapSingleRow(  ) ../DataMapper.php:167 
20 0.4533 21215780 Tx_Extbase_Persistence_Mapper_DataMapper->createEmptyObject( ) ../DataMapper.php:205
21 0.4533 21215892 unserialize ( ) ../DataMapper.php:224

Does anybody have a hint for me? I'm really in despair...

Best regards,
Zalán Somogyváry





More information about the TYPO3-project-typo3v4mvc mailing list