Bug #59971

Reset languageMode query setting for child object queries in Extbase

Added by Alexander Stehlik almost 6 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2014-06-29
Due date:
% Done:

0%

TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

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?


Related issues

Related to TYPO3 Core - Bug #50031: Ordering changes result if multilanguage content Closed 2013-07-15
Related to TYPO3 Core - Bug #82363: Make Extbase translation handling consistent with typoscript Closed 2017-09-07

History

#1 Updated by Gerrit Code Review almost 6 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

#2 Updated by Gerrit Code Review almost 6 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

#3 Updated by Gerrit Code Review almost 6 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

#4 Updated by Oliver Eglseder over 5 years ago

How would you configure another LanguageMode for child objects then?

#5 Updated by Alexander Stehlik over 5 years ago

I don't really have an answer for this yet. But I see these possibilities:

  • TCA
  • Annotations in the Domain model

#6 Updated by Oliver Eglseder over 5 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.

#7 Updated by Alexander Stehlik over 5 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.

#8 Updated by Gerrit Code Review about 5 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

#9 Updated by Gerrit Code Review about 5 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

#10 Updated by Gerrit Code Review over 4 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

#11 Updated by Gerrit Code Review about 4 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

#12 Updated by Gerrit Code Review almost 4 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

#13 Updated by Gerrit Code Review over 3 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

#14 Updated by Gerrit Code Review about 3 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

#15 Updated by Tymoteusz Motylewski over 2 years ago

  • Related to Bug #82363: Make Extbase translation handling consistent with typoscript added

#16 Updated by Anja Leichsenring almost 2 years ago

  • Status changed from Under Review to Rejected

closed in favor of #82363

Also available in: Atom PDF