Bug #59971
closedReset languageMode query setting for child object queries in Extbase
0%
Description
This behavior might be intended but it would be cool if it would be configurable somehow:
I have an Extbase domain model that can not be translated. It points to a child record that is translatable.
My setting config.sys_language_mode
is set to "strict".
When the language changes and the child record is not translated the parent object property will be empty (because the original object is removed during language overlay).
Should the getPreparedQuery() method in the DataMapper also reset the language mode setting by default to not destroy relations by language overlay?
$query->getQuerySettings()->setLanguageMode(NULL);
Should this be configurable? Feedback is welcome:)
An actual example of this problem can be found in the cz_simple_cal Extension. The index entries point to single events that might be translated or not. How would you handle this with language mode "strict"? Enhance the event index query, so that only index records are found where a translation exists?
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31227
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31227
Updated by Gerrit Code Review about 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31227
Updated by Oliver Eglseder about 10 years ago
How would you configure another LanguageMode for child objects then?
Updated by Alexander Stehlik about 10 years ago
I don't really have an answer for this yet. But I see these possibilities:
- TCA
- Annotations in the Domain model
Updated by Oliver Eglseder about 10 years ago
But then you won't have the chance to do it in a specific repository method, which i think is the place where setting languageMode for a query and object property queries is needed most.
Updated by Alexander Stehlik about 10 years ago
You still can use setLanguageMode()
in your own queries in your repository. This patch only indents to adjust the behavior of child object queries that are used by the DataMapper.
Updated by Gerrit Code Review over 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31227
Updated by Gerrit Code Review over 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31227
Updated by Gerrit Code Review about 9 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31227
Updated by Gerrit Code Review over 8 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31227
Updated by Gerrit Code Review over 8 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31227
Updated by Gerrit Code Review almost 8 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31227
Updated by Gerrit Code Review over 7 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31227
Updated by Tymoteusz Motylewski about 7 years ago
- Related to Bug #82363: Make Extbase translation handling consistent with typoscript added
Updated by Anja Leichsenring over 6 years ago
- Status changed from Under Review to Rejected
closed in favor of #82363