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 } } } } }
Updated by Andreas Kiessling over 1 year ago
- Related to Task #97638: Use local TypoScriptFrontendController instead of $GLOBALS['TSFE'] in ContentObjects added
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76121
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76121
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76174
Updated by Anonymous over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a7a443eca966f38190947b7213be65836f3e57cc.