Project

General

Profile

Actions

Bug #17478

closed

TCA: label and label_alt need to check for recursion in order to avoid an infinite loop

Added by Oliver Klee over 17 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-07-17
Due date:
% Done:

0%

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

Description

When a reference to the same record type is used as label_alt (while I suppose that the same problem exists for label, I suppose), a reference to t he current record will cause TYPO3 to hang in an infinite loop when trying to render the list view.

Example:

SQL:

#
  1. Table structure for table 'tx_vehicles_vehicle_attributes' #
    CREATE TABLE tx_vehicles_vehicle_attributes (
    uid int(11) NOT NULL auto_increment,
    pid int(11) DEFAULT '0' NOT NULL,
    tstamp int(11) DEFAULT '0' NOT NULL,
    crdate int(11) DEFAULT '0' NOT NULL,
    cruser_id int(11) DEFAULT '0' NOT NULL,
    sorting int(10) DEFAULT '0' NOT NULL,
    deleted tinyint(4) DEFAULT '0' NOT NULL,
    hidden tinyint(4) DEFAULT '0' NOT NULL,
    name tinytext NOT NULL,
    token tinytext NOT NULL,
    attribute_type_id int(11) DEFAULT '0' NOT NULL,
    vehicle_type int(11) DEFAULT '0' NOT NULL,
    parent_id int(11) DEFAULT '0' NOT NULL,
    children int(11) DEFAULT '0' NOT NULL,

    PRIMARY KEY (uid),
    KEY parent (pid)
    );

ext_tables.php:

$TCA['tx_vehicles_vehicle_attributes'] = Array (
'ctrl' => Array (
'title' => 'LLL:EXT:vehicles/locallang_db.xml:tx_vehicles_vehicle_attributes',
'label' => 'name',
'label_alt' => 'parent_id',
'label_alt_force' => 1,
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => Array (
'disabled' => 'hidden',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icon_tx_vehicles_vehicle_attributes.gif',
),
'feInterface' => Array (
'fe_admin_fieldList' => 'hidden, name, attribute_type_id, vehicle_type',
)
);

TCA:

$TCA['tx_vehicles_vehicle_attributes'] = Array (
'ctrl' => $TCA['tx_vehicles_vehicle_attributes']['ctrl'],
'interface' => Array (
'showRecordFieldList' => 'hidden,name,token,attribute_type_id,vehicle_type,parent_id,children'
),
'feInterface' => $TCA['tx_vehicles_vehicle_attributes']['feInterface'],
'columns' => Array (
'hidden' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
'config' => Array (
'type' => 'check',
'default' => '0'
)
),
'token' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:vehicles/locallang_db.xml:tx_vehicles_vehicle_attributes.token',
'config' => Array (
'type' => 'input',
'size' => '30',
)
),
'name' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:vehicles/locallang_db.xml:tx_vehicles_vehicle_attributes.name',
'config' => Array (
'type' => 'input',
'size' => '30',
'eval' => 'required',
)
),
'attribute_type_id' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:vehicles/locallang_db.xml:tx_vehicles_vehicle_attributes.attribute_type_id',
'config' => Array (
'type' => 'select',
'foreign_table' => 'tx_vehicles_attribute_types',
'foreign_table_where' => 'AND tx_vehicles_attribute_types.pid=###STORAGE_PID### ORDER BY tx_vehicles_attribute_types.sorting',
'size' => 1,
'minitems' => 0,
'maxitems' => 1,
)
),
'vehicle_type' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:vehicles/locallang_db.xml:tx_vehicles_vehicle_attributes.vehicle_type',
'config' => Array (
'type' => 'select',
'foreign_table' => 'tx_vehicles_vehicle_types',
'foreign_table_where' => 'AND tx_vehicles_vehicle_types.pid=###STORAGE_PID### ORDER BY tx_vehicles_vehicle_types.uid',
'size' => 3,
'minitems' => 0,
'maxitems' => 9,
'MM' => 'tx_vehicles_vehicle_attributes_vehicle_type_mm',
)
),
'parent_id' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:vehicles/locallang_db.xml:tx_vehicles_vehicle_attributes.parent_id',
'config' => Array (
'type' => 'select',
'foreign_table' => 'tx_vehicles_vehicle_attributes',
'foreign_table_where' =>
'AND tx_vehicles_vehicle_attributes.pid=###CURRENT_PID### '
.'AND tx_vehicles_vehicle_attributes.uid!=###THIS_UID### '
.'ORDER BY tx_vehicles_vehicle_attributes.name',
'size' => 1,
'minitems' => 0,
'maxitems' => 1,
'items' => array(
'' => 0
)
)
),
'children' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:vehicles/locallang_db.xml:tx_vehicles_vehicle_attributes.children',
'config' => Array (
'type' => 'inline',
'foreign_table' => 'tx_vehicles_vehicle_attributes',
'appearance' => array(
'collapseAll' => 0,
'newRecordLinkAddTitle' => 0,
'newRecordLinkPosition' => 'bottom',
'useSortable' => 1
),
'foreign_field' => 'parent_id',
'foreign_sortby' => 'sorting'
)
)
),
'types' => Array (
'0' => Array('showitem' => 'hidden;;1;;1-1-1, name, token, attribute_type_id, vehicle_type, parent_id, children')
),
'palettes' => Array (
'1' => Array('showitem' => '')
)
);

(issue imported from #M5984)

Actions #1

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #2

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions

Also available in: Atom PDF