Bug #17332
closedlabel field which is a relation is not human readable (the field is not resolved like in 4.0.x)
0%
Description
If you have a Table and the title of table is a field which is defined as Database relation to another table. The listview in the backend is not human readable.
Because the real fieldvalue is shown and not the title of the foreign table.
This was not the case in TYPO3 4.0.x
Use the attached testextension to test (table2 has relation to table1 with title field)
The reason is because of a change in
class.db_list_extra.inc
Since 4.1.1 the title comes from:
$recTitle = t3lib_BEfunc::getRecordTitle($table,$row,FALSE,TRUE);
(line 596)
in 4.0.5 this was not the case:
$recTitle = t3lib_BEfunc::getProcessedValueExtra($table,$fCol,$row[$fCol],$GLOBALS['BE_USER']->uc['titleLen'],$row['uid']);
----------------
Solutionidea:
Change class.t3lib_befunc.php function getRecordTitle
(line 1833)
-$t = $row[$TCA[$table]['ctrl']['label']];
+$t_value = $row[$TCA[$table]['ctrl']['label']]; +$t=t3lib_BEfunc::getProcessedValueExtra($table,$TCA[$table]['ctrl']['label'],$t_value,$GLOBALS['BE_USER']->uc['titleLen'],$row['uid']);
Greetings
(issue imported from #M5683)
Files
Updated by Oliver Hader over 17 years ago
Updated by Daniel Poetzinger over 17 years ago
The diff seems not to have the needed changes.
This is no issue for userfunc!
It is a feature which works for 4.0.x
This is the problem:
- if in "label" or "label_alt" is a field which is TCA-type relation the tablevalue is shown instead of the title of foreign table.
Solution:
The function getRecordTitle mußt use the
function getProcessedValueExtra to get value of fields!
Updated by Oliver Hader over 17 years ago
Please provide a unified diff file of your changes as attachment and don't copy everything into a note. Thanks!
Updated by Daniel Poetzinger over 17 years ago
(more friendly would have been nice...)
--------
As described earlier this is a feature which works for 4.0.x branch and is definitly wrong implemented in 4.1 branch!
---
Now attached two new files:
- alternative version of relationtest extension (with 3 tables and configured label_alt settings - to see the diffrence!)
- patch.txt with actual patch (4.1 branch) which uses the correct getProcessedValueExtra function and also set correct label_alt
Updated by Daniel Poetzinger about 17 years ago
any chance to get this in the actual branch 4.2 again?
Updated by Ralf Hettinger about 17 years ago
Confirming the issue, which is related to http://bugs.typo3.org/view.php?id=5094 (there was a patch there which would have solved this issue as well but it hasn't made it into the finally applied patch of 5094).
Daniel, I hope you are fine with me posting patches in the desired format for 4.1 and trunk as well as filing a RFC to the core list.