Bug #98622
closedPass down local TypoScriptFrontendController when instantiating a new ContentObjectRenderer from RECORDS and CONTENT
100%
Description
Related to https://forge.typo3.org/issues/97638
The issue came up during setting up EXT:solr in TYPO3 11.5 to index content elements attached to an EXT:news record.
The content elements were not indexed due to the missing TSFE when CONTENT renders them. Seems like this was simply overlooked when the other issues were fixed.
https://github.com/TYPO3/typo3/blob/a710f8c4a101916735fe358b1b5d58ed659e936f/typo3/sysext/frontend/Classes/ContentObject/RecordsContentObject.php#L92
https://github.com/TYPO3/typo3/blob/a710f8c4a101916735fe358b1b5d58ed659e936f/typo3/sysext/frontend/Classes/ContentObject/ContentContentObject.php#L77
When a new ContentObjectRenderer is instantiated in RecordsContentObject and ContentContentObject, the frontendController instance must be passed down.
Not passing it down in RecordsContentObject results in missing content in solr, not passing it then down in ContentContentObject results in warnings when running the indexer from the scheduler in the backend.
I'm not really sure how to test this outside of the solr context, but i described my setup in https://github.com/TYPO3-Solr/ext-solr/issues/3358
You need EXT:solr and EXT:news with news records that have content elements attached to them.
The news indexer then needs to load the content elements, e.g. like this
content = SOLR_CONTENT content { cObject = COA cObject { 5 = TEXT 5.field = teaser 10 = TEXT 10 { field = bodytext noTrimWrap = || | } 20 = CONTENT 20 { table = tt_content select { pidInList.field = pid orderBy = sorting languageField = sys_language_uid includeRecordsWithoutDefaultTranslation = 1 where = {#tt_content.tx_news_related_news} = ###NEWS_UID### markers { NEWS_UID.field = uid } } } } }