Project

General

Profile

Actions

Bug #70677

closed

Sorting of foreign records in TCA type select

Added by Christian Fries over 8 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Start date:
2015-10-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Currently records of a foreign table won't be sorted in a select field if foreign_table_where doesn't contain an "ORDER BY ..." statement.

I'd suggest the following solution:
  • Introduce a new option 'foreign_table_sortby'
  • If 'foreign_table_sortby' is defined, use this statement for sorting
  • Backward compatibility: If 'foreign_table_where' contains an 'ORDER BY ...' statement and 'foreign_table_sortby' is undefined, use the 'ORDER BY ...' statement as 'foreign_table_sortby'. If 'foreign_table_sortby' is defined, ignore 'ORDER BY ...' statements in 'foreign_table_where'
  • If 'foreign_table_sortby' is not defined, use 'default_sortby' of the foreign table

In the long term this is a cleaner solution and if no sorting is defined, the records are sorted according to the default sorting.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #90127: ambiguous column name title when editing content elementsClosedDaniel Siepmann2020-01-16

Actions
Blocks TYPO3 Core - Task #88933: Cleanup foreign_table_where directivesClosed2019-08-07

Actions
Actions

Also available in: Atom PDF