Project

General

Profile

Actions

Feature #64197

closed

Add support for foreign_default_sortby on TCA inline fields

Added by Jan Kornblum almost 10 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Start date:
2015-01-08
Due date:
% Done:

100%

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

Description

The origin issue has been closed (see below). But shouldn't this feature be implemented at all? I've seen several posts across the internet from people missing this feature...

--- Original issue ---

Issue #50439 has been updated by Alexander Opitz.

Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
----------------------------------------
Feature #50439: Reopened: Add support for foreign_default_sortby on TCA inline fields
http://forge.typo3.org/issues/50439#change-243018

Author: Jan Kornblum
Status: Closed
Priority: Should have
Assigned To:
Category: Extbase
Target version:
Has patch: No
Tags:
Complexity:

Persistence needs support for sorting child records by foreign_default_sortby, see http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/4/2/#id4431730

Won't this be implemented at all? Without the possibility of sorting children (object storage) nearly each domain model needs to be an aggregate root!?

Imagine you would like to output the following list in fluid (categories <1:n> seminars <1:n> events, where the children are lazy object storages in the parent):

- Categories (Alphabetical)
--- Seminars (Alphabetical)
------ Events (By date)

Currently this seems only to be possible by using something like FED DataSortViewHelper. The "usort" method in the model didn't work in my case because of some boolean issues i didn't figure out.

Is there really no possibility to extend extbase to respect a TCA "foreign_default_sortby" annotation?


Files

foreign_default_sortby.patch (5.69 KB) foreign_default_sortby.patch JAKOTA Design Group GmbH, 2023-02-28 17:54

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #27659: sorting by $TCA foreign_sortby vs. foreign_default_sortbyClosed2012-07-22

Actions
Actions #1

Updated by Jan Kornblum over 9 years ago

Am i wrong with my assumption that the core guys don't like to implement the feature to sorting (child) objectstorages on creation or that this is not really easy to accomplish (i've got this feeling by reading other issues)?

I've just recognized that other frameworks (e.g. like .net entity framework) don't offer the possibility to sort child objects on creation, too. But they usually offer the possibility to sort children in the views.

So an alternative would be, to integrate a sort-viewhelper directly into the core.

Actions #2

Updated by Mathias Schreiber about 9 years ago

  • Target version deleted (next-patchlevel)
Actions #3

Updated by Gerrit Code Review over 5 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/c/Packages/TYPO3.CMS/+/61487

Actions #4

Updated by Pascal Rinker over 5 years ago

  • Related to Bug #27659: sorting by $TCA foreign_sortby vs. foreign_default_sortby added
Actions #5

Updated by Gerrit Code Review over 5 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/c/Packages/TYPO3.CMS/+/61487

Actions #6

Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61487

Actions #7

Updated by Gerrit Code Review over 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 https://review.typo3.org/c/Packages/TYPO3.CMS/+/61487

Actions #8

Updated by Pascal Rinker over 5 years ago

  • Target version set to Candidate for Major Version
Actions #9

Updated by Gerrit Code Review over 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 https://review.typo3.org/c/Packages/TYPO3.CMS/+/61487

Actions #10

Updated by Gerrit Code Review about 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61487

Actions #11

Updated by Gerrit Code Review about 5 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/c/Packages/TYPO3.CMS/+/61487

Actions #12

Updated by Rainer Becker about 4 years ago

Any news on this? In TYPO3 10.4.9 the field used in foreign_sortby is still hidden from IRRE editing like described in the original ticket https://forge.typo3.org/issues/27659#note-1.

Actions #13

Updated by JAKOTA Design Group GmbH over 2 years ago

Hi,

Any news on this one?

I was facing the same problem in 11.5.x and applying this patch solved it.

I only simplified the patch a bit:

typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php

in protected function setOneToOneRelation(ColumnMap $columnMap, array $columnConfiguration = null): ColumnMap

 $columnMap->setChildSortByFieldName($columnConfiguration['foreign_sortby'] ?? null);

 to 

 $columnMap->setChildSortByFieldName($columnConfiguration['foreign_sortby'] ?? $columnConfiguration['foreign_default_sortby'] ?? null);

and protected function setOneToManyRelation(ColumnMap $columnMap, array $columnConfiguration = null): ColumnMap


 $columnMap->setChildSortByFieldName($columnConfiguration['foreign_sortby'] ?? null);

 to

 $columnMap->setChildSortByFieldName($columnConfiguration['foreign_sortby'] ?? $columnConfiguration['foreign_default_sortby'] ?? null);

Actions #14

Updated by JAKOTA Design Group GmbH over 1 year ago

Hi,

I've updated the fix from https://review.typo3.org/c/Packages/TYPO3.CMS/+/61487 and solved (so I hope) the issue Alexander Schnitzler mentioned in his last comment.

This Patch file is against main and I've tested it with 11.5.24.

Actions #15

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #16

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #17

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #18

Updated by Gerrit Code Review over 1 year ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #19

Updated by Gerrit Code Review over 1 year ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #20

Updated by Gerrit Code Review over 1 year ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #21

Updated by Gerrit Code Review over 1 year ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #22

Updated by Jan Kornblum over 1 year ago

JAKOTA Design Group GmbH wrote in #note-14:

Hi,

I've updated the fix from https://review.typo3.org/c/Packages/TYPO3.CMS/+/61487 and solved (so I hope) the issue Alexander Schnitzler mentioned in his last comment.

This Patch file is against main and I've tested it with 11.5.24.

Thx for fixing this! :)

Actions #23

Updated by Gerrit Code Review over 1 year ago

Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #24

Updated by Gerrit Code Review over 1 year ago

Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #25

Updated by JAKOTA Design Group GmbH over 1 year ago

Jan Kornblum wrote in #note-22:

Thx for fixing this! :)

Sure, I hope this gets approved, so I can get rid of my copy of the extbase extension which I have to rebase every month when a new version comes out.

So fixing this has more of selfish reason. ;)

Actions #26

Updated by Jan Kornblum over 1 year ago

JAKOTA Design Group GmbH wrote in #note-25:

Sure, I hope this gets approved, so I can get rid of my copy of the extbase extension which I have to rebase every month when a new version comes out.

So fixing this has more of selfish reason. ;)

What about https://forge.typo3.org/issues/88833 - coincidentally interested in fixing this, too? ;)

A similar issue, something essentially, missing since years although not such a "big thing" (i carefully suppose).

Actions #27

Updated by JAKOTA Design Group GmbH over 1 year ago

Maybe, but let's not get ahead of ourselves. I haven't even noticed that issue.

Actions #28

Updated by Gerrit Code Review over 1 year ago

Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #29

Updated by Gerrit Code Review over 1 year ago

Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #30

Updated by Gerrit Code Review over 1 year ago

Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #31

Updated by Gerrit Code Review over 1 year ago

Patch set 13 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #32

Updated by Gerrit Code Review over 1 year ago

Patch set 14 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #33

Updated by Gerrit Code Review over 1 year ago

Patch set 15 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77985

Actions #34

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77971

Actions #35

Updated by Anonymous over 1 year ago

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

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77971

Actions #37

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77971

Actions #38

Updated by Gerrit Code Review over 1 year ago

Patch set 4 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77971

Actions #39

Updated by Gerrit Code Review over 1 year ago

Patch set 5 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77971

Actions #40

Updated by Anonymous over 1 year ago

  • Status changed from Under Review to Resolved
Actions #41

Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF