Bug #21665

rendering a custom edit panel via pi_base results in an exception

Added by Björn Pedersen almost 12 years ago. Updated over 8 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


in class.tslib_content.php, function editPanel,

dataArray is overwritten with $this->data, even if $this->data is not an array.

Solution: add an is_array check for $this->data.

changing line 7912 to:
if (!count($dataArr)&&is_array($this->data)) {

see also: http://forge.typo3.org/issues/show/5474
(issue imported from #M12729)


class_tslib_content.patch (398 Bytes) class_tslib_content.patch Administrator Admin, 2009-11-25 08:31

Updated by Björn Pedersen almost 12 years ago

It seems to be a combination of an unlucky extension programming:
$this->data is empty, instead everything is in $this->cObj->data.

But I can't find the part where changed this( kickstarter generated extension).

But i think it should still get caught by tslib_content in any case.


Updated by Björn Pedersen almost 12 years ago

I did again more investigations:
in pibase->pi_getEditpanel a temporay CObject is created. If either the first ($row ) or the second argument ($tablename) evaluate to false, they are initialised from $this->internal['currentRow']; and

If used with 2 empty strings as dummy arguments, and these fallback values are not set as array() and string, then the error occurs.

Possible fixes: In the extension use:
$this->pi_getEditPanel(array(''),'<table name>','',$econf));

In core:
check the validity of the fallbacks as well and supply useful defaults.
2. tslib_content->editPanel:
check $this->data as in my patch


Updated by Alexander Opitz over 8 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (-1)
  • TYPO3 Version set to 4.3

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


Updated by Björn Pedersen over 8 years ago

I just TYPO3 4.7 code: No fixes have been done to the code. But my understanding was, that it is more a extension programming error:

do not use:


but use:
pi_getEditPanel(array(''),'<table name>','',$econf));

So I would also be fine with closing this bug.


Updated by Alexander Opitz over 8 years ago

  • Status changed from Needs Feedback to Closed

Also available in: Atom PDF