Project

General

Profile

Actions

Bug #19843

closed

DBAL 0.9.20 crashes TYPO3 4.2.x

Added by Sven Teuber over 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2009-01-16
Due date:
% Done:

0%

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

Description

When installing dbal on a 4.2.x installation of TYPO3, the backend will crash with a fatal error:

Fatal error: Call to a member function admin_get_charsets() on a non-object in /var/www/typo3-sources/typo3_src-4.2.3/t3lib/class.t3lib_install.php on line 457

Although this looks at first glance like a problem in the installer, it isn't conceptionally, I think.

It seems to fail due to a fundamental misconception. The error occurs when TYPO3 tries to set the $TYPO3_DB-object. While setting it, DBAL calls t3lib_install, which assumes that this object is already there! Without DBAL, the particular installer-method isn't even called in the first place.

Chicken and eggs, anyone? That's like using the car you are building just now to drive to the tire shop to get the tires. ;)

The real source of the error is
ux_t3lib_db->cacheFieldInfo()

238: $parsedExtSQL = $this->Installer->getFieldDefinitions_fileContent($extSQL);

This is where the installer is called although the mandatory object $TYPO3_DB is not set yet. I think dbal has to make sure the environment is set up correctly before calling core methods (which admittedly is a problem here).

If you want to trace it:

/typo3/index.php -> calls /typo3/init.php
init.php -> tries to make an instance of the db object:
167: $TYPO3_DB = t3lib_div::makeInstance('t3lib_DB');

t3lib_div detects the extension class ux_t3lib_db and tries to make an instance of that, leading to the failure in cacheFieldInfo().

(issue imported from #M10169)


Related issues 3 (0 open3 closed)

Is duplicate of TYPO3 Core - Bug #18689: Cannot upgrade from 4.1.6 to 4.2.0 due to errorClosedMichael Stucki2008-04-24

Actions
Has duplicate TYPO3 Core - Bug #18850: dbal 0.9.20 of typo 4.2 doesn´t workClosedKarsten Dambekalns2008-05-25

Actions
Has duplicate TYPO3 Core - Bug #19107: 4.2 is incompatible with ms-sqlClosedKarsten Dambekalns2008-07-15

Actions
Actions #1

Updated by Sven Teuber over 15 years ago

This is directly related to issue #8231, however, I don't know how to set the cross link

Actions #2

Updated by Christian Kuhn about 15 years ago

Resolved as duplicate of #8231

Actions

Also available in: Atom PDF