Project

General

Profile

Actions

Bug #53873

closed

Sorting of relation field (type=select)

Added by Bernhard Kraft about 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2013-11-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When a TCA field of type=select is rendered in TCEforms (FormEngine) there has to be an "ORDER BY" statement in the TCA key "foreign_table_where" or the entries won't be sorted at all.

This already cause bug reports like: #47688

Solution: In method "BackendUtility::exec_foreign_table_where_query": If "$wgolParts['ORDERBY']" is empty use "sortby" or "default_sortby" configuration from TCA 'ctrl' section.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #47688: Sorting not respected for backend_layout and backend_layout_next_level dropdownsClosedPatrick Broens2013-04-29

Actions
Actions #1

Updated by Markus Klein about 11 years ago

Which versions are affected?

Actions #2

Updated by Tobias Wollender almost 11 years ago

I have this problem with current 6.2 master. The "trick" with an "ORDER BY" in the "foreign_table_where" works, whereas sorting with "foreign_sortby" doesn't work at all.

Actions #3

Updated by Markus Klein over 10 years ago

Bernhard can you push a patch here?

Actions #4

Updated by Bernhard Kraft over 10 years ago

I am currently not sure about it. I am somehow quite unsure what to do about such issues?

The current situation is quite fine for me. I don't even know right now which project I worked on when I noticed this (I think it was the "seminars" extension).

I wouldn't call the solution a "trick" as it can be found everywhere in the core. See for example:
typo3/sysext/frontend/Configuration/TCA/tt_content.php

So if "tt_content" is using this "feature" I wouldn't call it a trick.

Of course we could add special code in the mentioned method which does some by-default ordering - but then we would also have to check if no alternate sorting is defined via the "foreign_table_where" key of TCA.

The reason why I am unsure about this is: You could add code and features everywhere. But the current situation is quite fine. Probably it's just my disunderstandement of things like: Why have a "context object" somewhere if an array would do it also.

If you feal fine about it just close this issue.

Actions #5

Updated by Markus Klein over 10 years ago

  • Status changed from New to Closed
  • Target version deleted (next-patchlevel)

Closed upon owner's request.

Actions

Also available in: Atom PDF