Project

General

Profile

Actions

Bug #31978

closed

tcaTree: PHP Warning: Missing argument 2 for extDirect_DataProvider_BackendUserSettings::addToList()

Added by Georg Ringer over 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2011-11-22
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

the tcatree throws an error every time it is called. I am not into ExtJS and neither into the tcaTree itself but IMO those information should be enough to fix it.

How to test
-------------
Install EXT:news, create at least one category and call either the category record or the plugin - both got a tca tree implemented

Information from debugging
---------------------------
The error comes from class t3lib_TCEforms_Tree which got an inline JS

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

Problem is that node.attributes.uid is undefined. This happens with the root node

Using this code to debug

if (node.attributes.uid) {
    top.TYPO3.BackendUserSettings.ExtDirect.addToList("tcaTrees." + this.ucId, node.attributes.uid);
} else {
    alert(node);
}

shows 2 alert boxes with:
[Node xnode-27]
[Node root]

Possible solutions ======================
As already stated, I no nothing about ExtJS but there are IMO 2 possible solutions:
1) Use an if clause "if (node.attributes.uid) {"

2) Maybe it is even more simple as IMO it should be node.attributes.id as t3lib_tree_pagetree_DataProvider also uses e.g. "$node->setId('root');" The maybe wrong value is also used in TYPO3.Components.Tree.TcaCheckChangeHandler inside tree.js


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #26741: Error at renderMode treeRejectedSteffen Gebert2011-05-11

Actions
Actions

Also available in: Atom PDF