I am using TYPO3 v12.
I want to implement multiple news articles in my own repository.
But somehow in the frontend I can only see the last one I created.
In Backend it looks fine.
Any Ideas?
The Debug Output from the Controller:
$pferde = $this->pferdRepository->findeMeinePferde($activeuserid);
foreach ($pferde as $pferd) {
$termine = $this->newsRepository->findeTermine($pferd->getUid());
foreach ($termine as $termin) {
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($termin);
$pferd->setNews($termin);
}
}
In
Pferd
, you defined the property$news
as a nullable object type 'News'.However, what you want (and have created correctly in the TCA) is an
ObjectStorage
that can contain severalNews
-objects.