Actions
Bug #104419
openTCA setting "allowLanguageSynchronization" for pages records not working when using extbase model
Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2024-07-18
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
8.2
Tags:
Complexity:
hard
Is Regression:
Sprint Focus:
Description
I've defined an extbase model based on table "pages" in file Configuration/Extbase/Persistence/Classes.php:
return [ \MyVendor\MyExt\Domain\Model\Teaser::class => [ 'tableName' => 'pages' ] ];
When I now request a translated page record...
$this->teaserRepository->findOneByUid(123)
...resulting object contains image from default language:
media => protectedTYPO3\CMS\Extbase\Domain\Model\FileReference prototypepersistent entity (uid=350, pid=264) uidLocal => protected 15 (integer) originalResource => protected NULL uid => protected 350 (integer) _localizedUid => protected 350 (integer) _languageUid => protected 0 (integer) _versionedUid => protected 350 (integer) pid => protected 264 (integer)
But "media" has setting "allowLanguageSynchronization=true", so I've expected the image from my translated page record here.
This is working for simple TCA fields like "type=input" and I've expected it's working for images, too.
I've uploaded an extension where you can test the behaviour.
Files
No data to display
Actions