You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A fatal error occurs in the backend module while indexing an Index Queue item. The error message indicates that the localRootLine property of TYPO3\CMS\Frontend\Page\PageInformation is accessed before it has been initialized.
component="ApacheSolrForTypo3.Solr.Domain.Index.IndexService": Failed indexing Index Queue item 457757 - {"code":0,"message":"Typed property TYPO3\\CMS\\Frontend\\Page\\PageInformation::$localRootLine must not be accessed before initialization","trace":"
#0 /var/www/html/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(3921): TYPO3\\CMS\\Frontend\\Page\\PageInformation->getLocalRootLine()
#1 /var/www/html/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(1301): TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer->getData('levelfield : -1...', Array)
#2 /var/www/html/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(1160):
To Reproduce
Use the following TypoScript configuration for indexing records:
Ensure that editors can manage page settings dynamically without hardcoded values.
Trigger indexing for the events queue.
The error occurs, preventing proper indexing.
Expected behavior
Indexing should work correctly without accessing uninitialized properties. The localRootLine property should be set before calling getLocalRootLine().
Used versions
TYPO3 Version: 13.4.2
EXT:solr Version: 13.0.0
PHP Version: 8.3
Fix
To fix the issue, we modified \ApacheSolrForTypo3\Solr\FrontendEnvironment\Tsfe.php after this position Tsfe.php to ensure the localRootLine is set before usage:
Describe the bug
A fatal error occurs in the backend module while indexing an Index Queue item. The error message indicates that the localRootLine property of TYPO3\CMS\Frontend\Page\PageInformation is accessed before it has been initialized.
To Reproduce
Expected behavior
Indexing should work correctly without accessing uninitialized properties. The localRootLine property should be set before calling getLocalRootLine().
Used versions
Fix
To fix the issue, we modified \ApacheSolrForTypo3\Solr\FrontendEnvironment\Tsfe.php after this position Tsfe.php to ensure the localRootLine is set before usage:
This change ensures that the root line is initialized before being accessed.
Is this helpful, or did I miss any important points?
If not, I’d be happy to contribute.
The text was updated successfully, but these errors were encountered: