[TYPO3-german] Objekte im ObjectStorage: Attributwerte der Superklasse werden nicht angezeigt

Wild Axel info at wild-solutions.de
Fri Oct 16 22:49:05 CEST 2015


Hallo,

ich habe es gelöst!

1. Zuerst auf Single Table Inheritance umgestellt.

2. fe_users erweitert in ext_tables.php:
t3lib_div::loadTCA('fe_users');
$addColumnArray = array(
    'abcfiles' => array(
        'exclude' => 0,
        'label' => 'ABCFiles:',
        'config' => array(
            'type' => 'select',
            'size' => 10,
            'minitems' => 0,
            'maxitems' => 9999,
            'autoSizeMax' => 5,
            'multiple' => 0,
            'foreign_table' => 'tx_abcfiles_domain_model_abcfile',
            'MM' => 'tx_abcfiles_tsuser_abcfile_mm',
        )
    ),
    'groups' => array(
        'exclude' => 0,
        'label' => 'Groups:',
        'config' => array(
            'type' => 'select',
            'size' => 10,
            'minitems' => 0,
            'maxitems' => 9999,
            'autoSizeMax' => 5,
            'multiple' => 0,
            'foreign_table' => 'tx_abcfiles_domain_model_tsgroup',
            'MM' => 'tx_abcfiles_tsuser_tsgroup_mm',   
        )
    ),
);
t3lib_extMgm::addTCAcolumns('fe_users', $addColumnArray);
t3lib_extMgm::addToAllTCAtypes('fe_users', 'abcfiles, groups');

(3. meine datei Configuration/TCA/TSUser.php gelöscht)

4.neue Datei erstellt in Configuration/TCA/Overrides/fe_users.
ACHTUNG: ist evtl. gar nicht nötig, da ja bereits in ext_tables.php schon geschehen!!!!!!!!!!

<?php
defined('TYPO3_MODE') or die();

	$tca = array(
		'ctrl' => array(
			'type' => 'tx_extbase_type',
		),
		'columns' => array(
			'tx_extbase_type' => array(
				'exclude' => 1,
				'label' => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type',
				'config' => array(
					'type' => 'select',
					'items' => array(
						array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type.0', '0'),
						array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type.Tx_Extbase_Domain_Model_FrontendUser', 'Tx_Extbase_Domain_Model_FrontendUser'),
                                                array('Tx_Abcfiles_Domain_Model_TSUser', 'Tx_Abcfiles_Domain_Model_TSUser')
					),
					'size' => 1,
					'maxitems' => 1,
					'default' => '0'
				)
			),                    
                        'groups' => array(
                            'exclude' => 1,
                            'label' => 'LLL:EXT:abcfiles/Resources/Private/Language/locallang_db.xlf:tx_abcfiles_domain_model_tsuser.groups',
                            'config' => array(
				'type' => 'select',
				'foreign_table' => 'tx_abcfiles_domain_model_tsgroup',
				'MM' => 'tx_abcfiles_tsuser_tsgroup_mm',                                
				'size' => 10,
				'autoSizeMax' => 30,
				'maxitems' => 9999,
				'multiple' => 0,
				'wizards' => array(
					'_PADDING' => 1,
					'_VERTICAL' => 1,
					'edit' => array(
						'type' => 'popup',
						'title' => 'Edit',
						'script' => 'wizard_edit.php',
						'icon' => 'edit2.gif',
						'popup_onlyOpenIfSelected' => 1,
						'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
						),
					'add' => Array(
						'type' => 'script',
						'title' => 'Create new',
						'icon' => 'add.gif',
						'params' => array(
							'table' => 'tx_abcfiles_domain_model_tsgroup',
							'pid' => '###CURRENT_PID###',
							'setValue' => 'prepend'
							),
						'script' => 'wizard_add.php',
					),
                                    ),
                            ),                        
                        ),
                        'abcfiles' => array(
                            'exclude' => 1,
                            'label' => 'LLL:EXT:spxfiles/Resources/Private/Language/locallang_db.xlf:tx_abcfiles_domain_model_tsuser.abcfiles',
                            'config' => array(
				'type' => 'select',
				'foreign_table' => 'tx_abcfiles_domain_model_abcfile',
				'MM' => 'tx_abcfiles_tsuser_abcfile_mm',
				'size' => 10,
				'autoSizeMax' => 30,
				'maxitems' => 9999,
				'multiple' => 0,
				'wizards' => array(
					'_PADDING' => 1,
					'_VERTICAL' => 1,
					'edit' => array(
						'type' => 'popup',
						'title' => 'Edit',
						'script' => 'wizard_edit.php',
						'icon' => 'edit2.gif',
						'popup_onlyOpenIfSelected' => 1,
						'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
						),
					'add' => Array(
						'type' => 'script',
						'title' => 'Create new',
						'icon' => 'add.gif',
						'params' => array(
							'table' => 'tx_abcfiles_domain_model_abcfile',
							'pid' => '###CURRENT_PID###',
							'setValue' => 'prepend'
							),
						'script' => 'wizard_add.php',
					),
				),
                            ),
                    ),
		),
		'types' => array(
			'Tx_Extbase_Domain_Model_FrontendUser' => $GLOBALS['TCA']['fe_users']['types']['0'],
		),                
	);
	$GLOBALS['TCA']['fe_users'] = array_replace_recursive($GLOBALS['TCA']['fe_users'], $tca);
	\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'tx_extbase_type');

5. StoragePid muss natürlich auch gesetzt sein. Durch das viele RundUmaDummtesten hat diese auch zeitweise mal nicht gestimmt!

Hat viel Zeit und Nerven gekostet, aber jetzt habe ich auch das Gefühl, dass ich etwas schlauer bin!
Und siehe da, im BE und FE alles da!
Vielleicht hilft 


More information about the TYPO3-german mailing list