Bug #33499
closedBackend ignores l10n_mode in record titles
100%
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', ...
Updated by Jonas Renggli almost 13 years ago
- title is generated in
getRecordTitle()
(t3lib/class.t3lib_befunc.php
)
Updated by Jan Kiesewetter almost 13 years 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 over 12 years 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 over 12 years 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 over 12 years 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 over 12 years 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 almost 12 years 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 almost 12 years 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 almost 12 years 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 over 11 years 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 over 11 years 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 over 11 years ago
Patch set 9 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review over 11 years ago
Patch set 10 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 11 years ago
Patch set 11 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review almost 11 years ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review almost 11 years ago
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review almost 11 years ago
Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review almost 11 years ago
Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review almost 11 years ago
Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review almost 11 years ago
Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review over 10 years ago
Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review over 10 years ago
Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Gerrit Code Review over 10 years ago
Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/10448
Updated by Markus Klein over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f8896e10a44c2779c71fdd34d90834f4e28e66a8.
Updated by Gerrit Code Review over 10 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29492
Updated by Christian Kuhn over 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset 05eb1f2efb8b781ce34052a5dd38ddcaf5372298.