TYPO3 Exception 1476045117

TYPO3 [V9] - [2023/12/05]

The Issue

This error mesage appears in the frontend when using an Extbase model.

(1/1) #1476045117 TYPO3CMSExtbasePersistenceGenericExceptionInvalidClassException

Could not find class definition for name "Videos". This could be caused by a mis-spelling of the class name in the class definition.

Solution

In the model, you have to use the full namespace for properties, replace:

use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
use \Site\Mda\Domain\Model\Videos;

/**
 * @var ObjectStorage<Videos>
 */
protected $videos;
Copied!

with:

/**
 * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Site\Mda\Domain\Model\Videos>
 */
protected $videos;
Copied!