Deprecation: #111326 - LanguageAspect::OVERLAYS_ON 

See forge#111326

Description 

The overlay type \TYPO3\CMS\Core\Context\LanguageAspect::OVERLAYS_ON (value 'on' ) has been marked as deprecated and will be removed in TYPO3 v16.0.

This overlay type is never created from a site configuration: fallbackType: strict results in LanguageAspect::OVERLAYS_ON_WITH_FLOATING , fallbackType: fallback in LanguageAspect::OVERLAYS_MIXED and fallbackType: free in LanguageAspect::OVERLAYS_OFF . It is only used when a LanguageAspect is created manually.

The record overlay in PageRepository already treats both overlay types the same way. The only difference is how records of the requested language without a record in the default language ("floating" records) are handled: with LanguageAspect::OVERLAYS_ON , the TypoScript content object CONTENT and Extbase repositories do not include them. Removing this overlay type reduces the number of language overlay modes that need to be considered.

Impact 

Creating a LanguageAspect with the overlay type 'on' triggers a PHP deprecation warning. The behavior stays the same until the overlay type is removed in TYPO3 v16.0.

Affected installations 

TYPO3 installations with custom extensions that create a LanguageAspect with LanguageAspect::OVERLAYS_ON or the value 'on' , for example to set a custom language aspect on Extbase query settings or in the context.

The extension scanner reports usages of the constant as a strong match.

Migration 

Use LanguageAspect::OVERLAYS_ON_WITH_FLOATING instead. This is the overlay type that is used by sites with fallbackType: strict .

Records of the requested language without a record in the default language are then included in the result. If they must not be shown, exclude them in the query. For the content object CONTENT , set the option select.includeRecordsWithoutDefaultTranslation = 0 .

Before (deprecated)
use TYPO3\CMS\Core\Context\LanguageAspect;

$languageAspect = new LanguageAspect(1, 1, LanguageAspect::OVERLAYS_ON);
Copied!
After
use TYPO3\CMS\Core\Context\LanguageAspect;

$languageAspect = new LanguageAspect(1, 1, LanguageAspect::OVERLAYS_ON_WITH_FLOATING);
Copied!