Bug #32216

OrderBy on translated records doesn't work properly

Added by Alessandro Bellafronte over 7 years ago. Updated 9 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-11-30
Due date:
% Done:

100%

TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hello all
I looked for a similar issue in the bugtracker and I wondered that I couldn't find any report for this problem. Im my opinion it shouldn't be an unusual case, so if I'm just reporting a known issue please feel free to delete this report.

Usecase:
I'm trying to get all localized records from the repository ordered by their "title"-attribute.

Problem:
The records are ordered by their title in default language, instead by their translated title.

Possible Cause:
The ordering takes place when the records with sys_language_uid = 0 are requested from db ("ORDER BY"-clause). The language overlay for the current language is done later, without any ordering-reimplementation.

Suggestions:
I'm not sure what's the best way to fix the problem. Sorting the translated record after doing the language-overlay is more an hack than a practicable way to fix this issue, and not performant at all. I hope that anybody has a better idea, how to handle this.


Related issues

Related to TYPO3 Core - Bug #45873: querySettings setRespectSysLanguage or setSysLanguageUid does not work Closed 2013-02-27
Related to TYPO3 Core - Bug #77298: Wrong language overlay logic in extbase Closed 2016-07-29
Related to TYPO3 Core - Bug #84707: Extbase wrongly counting translated objects Closed 2018-04-12

Associated revisions

Revision 432d72b1 (diff)
Added by Nicole Cordes almost 7 years ago

[FEATURE] Improved translation handling for statement generation

When selecting items in a language other than default one, the
relations (e.g. for IRRE) can not be resolved correctly. This
fix adds the current language if handling is enabled for the chosen
table. Besides it corrects the ordering of items as it selects all
possible ones. For correct overlay the origin is fetched before.

Change-Id: Ibcfe83314c0f2fff54348d9ffab97cd7546779ca
Resolves: #32072
Resolves: #32216
Releases: 6.0
Reviewed-on: http://review.typo3.org/10188
Reviewed-by: Jochen Rau
Tested-by: Jochen Rau
Reviewed-by: Stefan Neufeind
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

History

#1 Updated by Gerrit Code Review about 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10188

#2 Updated by Gerrit Code Review about 7 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10188

#3 Updated by Gerrit Code Review about 7 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10188

#4 Updated by Gerrit Code Review about 7 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10188

#5 Updated by Gerrit Code Review about 7 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10188

#6 Updated by Gerrit Code Review almost 7 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10188

#7 Updated by Markus G√ľnther almost 7 years ago

  • Category set to Extbase: Generic Persistence
  • Has patch changed from No to Yes

#8 Updated by Gerrit Code Review almost 7 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10188

#9 Updated by Nicole Cordes almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:fdeb26768835a36ae69a8cb6b801b37ea6671c83.

#10 Updated by Michael Stucki over 3 years ago

  • Project changed from Extbase MVC Framework to TYPO3 Core
  • Category deleted (Extbase: Generic Persistence)
  • TYPO3 Version set to 4.5
  • Is Regression set to No

#11 Updated by Kevin Ditscheid about 1 year ago

  • Related to Bug #84707: Extbase wrongly counting translated objects added

#12 Updated by Benni Mack 9 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF