Bug #23306

DB browser is unusable

Added by Alienor.net about 5 years ago. Updated almost 5 years ago.

Status:Closed Start date:2010-07-29
Priority:Should have Due date:
Assigned To:Steffen Ritter % Done:

0%

Category:- Spent time: -
Target version:-
TYPO3 Version:4.4 Is Regression:
PHP Version:5.3 Sprint Focus:
Complexity:

Description

If you click on DB browser icon from, for example, the "db mount" field of a BE Group record, the usual page tree is replaced with the following error :

t3lib_error_Exception
PHP Catchable Fatal Error: Argument 2 passed to t3lib_iconWorks::getSpriteIconForRecord() must be an array, null given, called in [...]/typo3/class.browse_links.php on line 1922 and defined in [...]/t3lib/class.t3lib_iconworks.php line 735

This was introduced by the patch to the bug 14880 that added array type hinting to the second argument of getSpriteIconForRecord() method.
As no real record is found when $this->expandPage = 0 (the root page - which is selected by default), a null value get passed to the method, hence the error.
Since the selectable icon is not needed for the root page, the new patch adds a condition that checks if a valid record was found before calling the getSpriteIconForRecord() method and related code. TYPO3 4.4 and the trunk are concerned.
(issue imported from #M15292)

class.browse_links.php.patch Magnifier (1.8 kB) Administrator Admin, 2010-07-29 18:57

rfc#15292_v2.diff Magnifier (1.8 kB) Administrator Admin, 2010-07-29 19:44

ExceptionInfo.html Magnifier (6.1 kB) Administrator Admin, 2010-08-01 13:52


Related issues

related to Core - Bug #23008: getSpriteIconForRecord() accepts row data which is not an... Closed 2010-06-26
related to Core - Bug #23335: it's not possible to edit BE_users created by earlier typ... Closed 2010-08-02

History

#1 Updated by Oliver Hader about 5 years ago

I was not able to reproduce this issue.
Can you please give a step by step description on how to reproduce the behaviour? Thanks!

#2 Updated by Alexandre G about 5 years ago

First, I wasn't clear enough on the version affected : 4.4.0 is not affected by this bug, but 4.4.1 is.

So here are the steps to reproduce, on a fresh install :
- Edit a BE user record
- In Options > DB Mount field, click on the folder icon ("Browse for records")
- If the error message is not yet there, click on the red arrow next to the root page > The error should happen
- In all subsequent attempts (until re-login), you should get the error message without having to click on the red arrow.

#3 Updated by Freddy Kühne about 5 years ago

Same issue can be reproduced, when editing a template (browse for basis template, select root node) -> see ExceptionInfo.html

Error is also reported in system log:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1: PHP Catchable Fatal Error: Argument 2 passed to t3lib_iconWorks::getSpriteIconForRecord() must be an array, null given, called in C:\Program Files\XAMPP\htdocs\typo3_441\typo3\class.browse_links.php on line 1922 and defined in C:\Program Files\XAMPP\htdocs\typo3_441\t3lib\class.t3lib_iconworks.php line 735 | t3lib_error_Exception thrown in file C:\Program Files\XAMPP\htdocs\typo3_441\t3lib\error\class.t3lib_error_errorhandler.php in line 101

#4 Updated by Oliver Hader about 5 years ago

v2 of the patch was committed to SVN by Susanne
  • trunk rev 8460
  • 4-4 rev 8461

#5 Updated by Ingo Renner almost 5 years ago

released in
4.4.2

Also available in: Atom PDF