Project

General

Profile

Actions

Bug #33499

closed

Backend ignores l10n_mode in record titles

Added by Jonas Renggli about 12 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-01-27
Due date:
% Done:

100%

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

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',
    ...

Actions #1

Updated by Jonas Renggli about 12 years ago

  • title is generated in getRecordTitle() (t3lib/class.t3lib_befunc.php)
Actions #2

Updated by Jan Kiesewetter about 12 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];
        }
    }    
}

Actions #3

Updated by Gerrit Code Review about 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

Actions #4

Updated by Gerrit Code Review about 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

Actions #5

Updated by Gerrit Code Review almost 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

Actions #6

Updated by Markus Klein almost 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.)

Actions #7

Updated by Gerrit Code Review over 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10448

Actions #8

Updated by Gerrit Code Review about 11 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10448

Actions #9

Updated by Gerrit Code Review about 11 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10448

Actions #10

Updated by Gerrit Code Review almost 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

Actions #11

Updated by Gerrit Code Review almost 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

Actions #12

Updated by Gerrit Code Review almost 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

Actions #13

Updated by Gerrit Code Review almost 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

Actions #14

Updated by Gerrit Code Review over 10 years ago

Patch set 11 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10448

Actions #15

Updated by Gerrit Code Review over 10 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

Actions #16

Updated by Gerrit Code Review over 10 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

Actions #17

Updated by Gerrit Code Review over 10 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

Actions #18

Updated by Gerrit Code Review about 10 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

Actions #19

Updated by Gerrit Code Review about 10 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

Actions #20

Updated by Gerrit Code Review about 10 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

Actions #21

Updated by Gerrit Code Review about 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

Actions #22

Updated by Gerrit Code Review about 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

Actions #23

Updated by Gerrit Code Review about 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

Actions #24

Updated by Markus Klein about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #25

Updated by Gerrit Code Review about 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

Actions #26

Updated by Christian Kuhn about 10 years ago

  • Status changed from Under Review to Resolved
Actions #27

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF