Bug #53873
closedSorting of relation field (type=select)
0%
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.
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.
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.
Updated by Markus Klein over 10 years ago
- Status changed from New to Closed
- Target version deleted (
next-patchlevel)
Closed upon owner's request.