Bug #33499
Backend ignores l10n_mode in record titles
| Status: | Under Review | Start date: | 2012-01-27 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| TYPO3 Version: | 4.5 | Complexity: | ||
| PHP Version: | ||||
| Votes: | 0 |
Description
All titles of translated records are displayed as "[No title]" if the l10n_mode of the field selected as label is set to "exclude".
This is quite annoying because editors get a list including dozens of records titled with "[No title]" when editing records in list module. The editor can help himself by activating "Localization view" this way records are shown as following:
- Name 1
- [No title]
- [No title]
- Name 2
- [No title]
- [No title]
- Name 3
- [No title]
What do you think about using the same value as title in backend that is already used in frontend (e.g. extbase automatically uses l10n_mode). This would be much more consistent because editors can't even set the value for the title field (because it's excluded) but there's one displayed in FE.
Additional Information
$TCA['tx_abcd_table'] = array(
'ctrl' => array(
'label' => 'name',
...
'columns' => array(
'name' => array(
'l10n_mode' => 'exclude',
...
History
Updated by Jonas Renggli over 1 year ago
- title is generated in
getRecordTitle()(t3lib/class.t3lib_befunc.php)
Updated by Jan Kiesewetter over 1 year ago
Currently you can handle this in your own extensions with a label_userFunc (since Typo3 4):
//include file in ext_tables.php
t3lib_div::requireOnce(t3lib_extMgm::extPath($_EXTKEY) . 'Classes/Utility/TCAUserFunc.php');
//add label_userFunc
$TCA['tx_abcd_table'] = array(
'label' => 'name',
'label_userFunc' => 'Tx_ExtKey_Utility_TCALabelUserFunc->getLabel',
...
TCAUserFunc.php
class Tx_ExtKey_Utility_TCALabelUserFunc {
/**
* Set $params['title'] to label of $l10n_parent and label of sys_language if translation and title empty
*
* @param array $params
* @return void
*/
public function getLabel(array $params){
/**
* labelRow
*
* @var string
*/
$labelRow = 'name';
if ($params['row']['sys_language_uid'] > 0 && empty($params['row'][$labelRow])) {
$l10n_parent = t3lib_BEfunc::getRecord($params['table'], $params['row']['l10n_parent'],$labelRow);
$sys_language = t3lib_BEfunc::getRecord('sys_language', $params['row']['sys_language_uid'],'title');
$params['title'] = $l10n_parent[$labelRow] . ' - ' . $sys_language['title'];
} else {
$params['title'] = $params['row'][$labelRow];
}
}
}
Updated by Gerrit Code Review about 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10448
Updated by Gerrit Code Review about 1 year ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10448
Updated by Gerrit Code Review about 1 year ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10448
Updated by Markus Klein about 1 year ago
Test this by simply setting in typo3conf/ext_tables.php:
t3lib_div::loadTCA('tt_content');
$GLOBALS['TCA']['tt_content']['columns']['header']['l10n_mode'] = 'exclude';
$GLOBALS['TCA']['tt_content']['ctrl']['label_alt'] = '';
Then you translate any content element and [No Title] will be shown without the patch.
(Note: Nobody would do this for tt_content, but it's relevant for extension tables. tt_content is just a nice way to test.)
Updated by Gerrit Code Review 7 months ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10448
Updated by Gerrit Code Review 4 months ago
Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review 4 months ago
Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review about 1 month ago
Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review about 1 month ago
Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review 14 days ago
Patch set 9 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10448