Project

General

Profile

Actions

Bug #17332

closed

label field which is a relation is not human readable (the field is not resolved like in 4.0.x)

Added by Daniel Poetzinger almost 17 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2007-05-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

T3X_relationtest-0_0_0-z-200705251147.t3x (11 KB) T3X_relationtest-0_0_0-z-200705251147.t3x Administrator Admin, 2007-05-25 11:45
T3X_relationtest-0_0_0-z-200707221430.t3x (16.3 KB) T3X_relationtest-0_0_0-z-200707221430.t3x Administrator Admin, 2007-07-22 14:34
patch.txt (693 Bytes) patch.txt Administrator Admin, 2007-07-22 14:34
5683_4.1.3.patch (587 Bytes) 5683_4.1.3.patch Administrator Admin, 2007-11-09 14:16
5683_trunk.patch (646 Bytes) 5683_trunk.patch Administrator Admin, 2007-11-09 14:16
T3X_relationtest-0_0_0-z-200711091625.t3x (16.4 KB) T3X_relationtest-0_0_0-z-200711091625.t3x Administrator Admin, 2007-11-09 16:24

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #15893: New TCA-options for getting labels with user-functionsClosedOliver Hader2006-03-24

Actions
Related to TYPO3 Core - Feature #17234: Evaluate label and label-alt in the title bar of child records.ClosedOliver Hader2007-04-24

Actions
Actions #2

Updated by Daniel Poetzinger almost 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!

Actions #3

Updated by Oliver Hader almost 17 years ago

Please provide a unified diff file of your changes as attachment and don't copy everything into a note. Thanks!

Actions #4

Updated by Daniel Poetzinger almost 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

Actions #5

Updated by Daniel Poetzinger over 16 years ago

any chance to get this in the actual branch 4.2 again?

Actions #6

Updated by Ralf Hettinger over 16 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.

Actions #7

Updated by Daniel Poetzinger over 16 years ago

+1

Actions #8

Updated by Ingmar Schlecht over 16 years ago

Committed to trunk.

Actions

Also available in: Atom PDF