Bug #26741

Error at renderMode tree

Added by Arno Dudek about 4 years ago. Updated almost 3 years ago.

Status:Rejected Start date:2011-05-11
Priority:Must have Due date:
Assigned To:Steffen Gebert % Done:

0%

Category:Backend User Interface Spent time: -
Target version:-
TYPO3 Version:4.5 Is Regression:
PHP Version: Sprint Focus:
Complexity:

Description

Using v4.5.0 / v4.5.2
Firefox 4.0.1

I got an PHP error in the Log-Module when using the renderMode tree in TCA:

Core: Error handler (BE): PHP Warning: Missing argument 2 for extDirect_DataProvider_BackendUserSettings::addToList() in /Volumes/Jobs/adgrafik/000000-TYPO3 Develop/typo3_4.5.2.ip.dev/t3lib/extjs/dataprovider/class.extdirect_dataprovider_beusersettings.php line 107

This happens when the form is open.

Found the line where the problem is:
File class.t3lib_tceforms_tree.php (3 matches) Line 176

expandnode: function(node) {
    top.TYPO3.BackendUserSettings.ExtDirect.addToList("tcaTrees." + this.ucId, node.attributes.uid);
}

TCA-config:

'type' => 'select',
'size' => 3,
'autoSizeMax' => 15,
'minitems' => 0,
'maxitems' => 99,
'foreign_table' => 'tx_ext_domain_model_category',
'foreign_table_where' => 'AND (tx_ext_domain_model_category.sys_language_uid = 0 OR tx_ext_domain_model_category.l18n_parent = 0) ORDER BY tx_ext_domain_model_category.sorting',
'MM' => 'tx_ext_category_layer_mm',
'MM_opposite_field' => 'layers',
'renderMode' => 'tree',
'treeConfig' => array(
    'parentField' => 'parent_category',
    'appearance' => array(
        'expandAll' => true,
        'showHeader' => true,
    ),
),

Tracing the variable node.attributes with firebug:

Object { iconCls="t3-icon t3-icon-tcareco..._model_category-default", text="c-test", mehr...}
Object { iconCls="t3-icon t3-icon-tcareco..._model_category-default", text="Category", mehr...}
Object { text="TYPO3 StandardTree", id="root", mehr...}

The first line is the category, the second the root. The last one have no uid set.

Hope this will help.

lg arno

first_run.png (193.8 kB) Arno Dudek, 2011-09-14 09:26

second_run.png (201.7 kB) Arno Dudek, 2011-09-14 09:26


Related issues

duplicates Core - Bug #31978: tcaTree: PHP Warning: Missing argument 2 for extDirect_Da... Resolved 2011-11-22

History

#1 Updated by Andreas Wolf almost 4 years ago

  • Category set to Backend User Interface
  • Status changed from New to Needs Feedback

I'm not too deep into the whole tree stuff, so maybe the answers to my questions are rather obvious... How is the data for the tree provided? Could it be a problem with your data provider or the node? As I see it, you can only store the expansion state for nodes with a uid - and that is obviously missing here.

#2 Updated by Arno Dudek almost 4 years ago

The data will be stored as aspected. I had never a problem with this.
But it produced an error in the "TYPO3-Log" every time a form is opend.

I made some screenshots to show you.
In the file "first run" you'll see node.attributes.uid = "4". This comes for every category.
The file "secon run" shows you the root of the tree. There is the property "uid" is missing.

#3 Updated by Björn Pedersen almost 3 years ago

Same as http://forge.typo3.org/issues/31978 (which is newer, but has better analysis)?

#4 Updated by Steffen Gebert almost 3 years ago

  • Status changed from Needs Feedback to Rejected
  • Assigned To set to Steffen Gebert

closed as duplicate of #31978

Also available in: Atom PDF