Project

General

Profile

Actions

Feature #41346

closed

Storing foreign_sortby fields for IRRE 1:n comma-separated values

Added by Thomas Luzat about 12 years ago. Updated almost 9 years ago.

Status:
Rejected
Priority:
Won't have this time
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2012-09-25
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
nightmare
Sprint Focus:

Description

When setting up an 1:n relation in IRRE without a foreign_field, that is a relation stored as a comma-separated list of values, foreign_sortby does not get updated on TYPO3 4.7.4. It is still used in a couple of queries (e.g. my Extbase model returns objects according to ORDER BY sorting).

This behavior is somewhat inconsistent and unexpected. Also, I couldn't find any info that this combination shouldn't work. To improve the situation a bit I patched my copy of t3lib/class.t3lib_tcemain.php (see attached patch). This works for me (the values are getting "sorting" values of 0, 1, ...), but is probably somewhat hackish.

I think this should be addressed or at least documented even if this relation type might be somewhat frowned upon.


Files

class.t3lib_tcemain.php.patch (868 Bytes) class.t3lib_tcemain.php.patch Basic patch Thomas Luzat, 2012-09-25 12:24
Actions #1

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/28073

Actions #2

Updated by Gerrit Code Review over 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 https://review.typo3.org/28073

Actions #3

Updated by Alexander Opitz about 9 years ago

  • Status changed from Under Review to Needs Feedback

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.15 or 7.6.0)?

Actions #4

Updated by Oliver Hader almost 9 years ago

  • Status changed from Needs Feedback to Rejected
  • Priority changed from Could have to Won't have this time
  • Complexity set to nightmare

The foreign_sortyby and symmetric_sortyby properties are only available for the foreign_field approach, not for the 1:n CSV approach. This is unfortunately not well documented, which is the reason for me creating an accordant pull request to the documentation (https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TCA/pull/52).

Implementing that behavior for 1:n CSV is not trivial since the serialization order of the parent (string), default sortby, foreign_sortby and symmetric_sortby needs to be implemented and considered for live workspaces, draft workspaces and record localizations as well.

The comma-seprated-list behavior on record relations is a topic to be deprecated in TYPO3 CMS 8 however...

Actions

Also available in: Atom PDF