[TYPO3-dev] Correct usage of translated records in CLI
Bernhard Kraft
kraftb at think-open.at
Sat Aug 11 04:09:58 CEST 2018
On 06/16/2018 11:05 AM, m+typo3-dev at qxio.tk wrote:
> Now my problem now is that I still get the record in the main laguage
> because DataMapper->mapSingleRow() (called via DataMapper->map()) has
> some kind of object cache and thus returns the object in the default
> language (because the uid is still the one of the record in the main
> language).
There is a way to invalidate the object storage cache:
Make an instance of: "TYPO3\CMS\Extbase\Persistence\Generic\Session" and
call the "destroy" method. This will invalidate the persistence session
storage and you could fetch an object with the same uid a second time in
a translated language.
In fact I have posted some patches to review.typo3.org for cleaning up
the "doLanguageAndWorkspaceOverlay" method. Currently it is not possible
to skip either (or both) of language and workspace overlay.
greetings,
Bernhard
More information about the TYPO3-dev
mailing list