Project

General

Profile

Actions

Bug #28098

closed

call to t3lib_div::compat_version() in config_default.php breaks the system

Added by Patrick Rodacker almost 13 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-07-11
Due date:
% Done:

0%

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

Description

with the current master my system breaks when the following two options are not set within the localconf.php

$TYPO3_CONF_VARS['BE']['forceCharset'] = 'utf-8';
$TYPO3_CONF_VARS['SYS']['setDBinit'] = 'SET NAMES utf8';

The following error stack shows, that t3lib_div::compat_version() tries to call t3lib_utility_VersionNumber::convertVersionNumberToInteger() and can't find the class, because the autloader is initialized later in config_default.php

Fatal error: Class 't3lib_utility_VersionNumber' not found in /Users/rodi/dev/typo3_src-git/t3lib/class.t3lib_div.php on line 792
Call Stack
#    Time    Memory    Function    Location
1    0.0016    336796    {main}( )    ../index.php:0
2    0.0043    465232    require( '/Users/rodi/dev/typo3_src-git/typo3/sysext/cms/tslib/index_ts.php' )    ../index.php:78
3    0.0304    2447016    require( '/Users/rodi/dev/typo3_src-git/t3lib/config_default.php' )    ../index_ts.php:123
4    0.0310    2499548    t3lib_div::compat_version( )    ../config_default.php:698

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #30827: t3lib_utility_VersionNumber is not found after trying to upgradeRejected2011-10-12

Actions
Has duplicate TYPO3 Core - Bug #28099: Fatal error if setDBinit not set in localconf.phpClosedXavier Perseguers2011-07-12

Actions
Actions #1

Updated by Christian Kuhn almost 13 years ago

Patrick and me just discussed possible solutions, here are the most clever solutions:

- Require t3lib_utility_VersionNumber before the deprecation checks (simple + safe, but upgly)
- Move the deprecation checks (or at least some of them) below the autoloader initialization (simple + pretty safe + not too ugly)

We'll probably come up with a patch for the second variant.

Actions #2

Updated by Philipp Gampe almost 13 years ago

Hey, I just hit the same problem ... :)

Actions #3

Updated by Mr. Hudson almost 13 years ago

Patch set 1 of change I1588d268bee22cc19976d1ef2a14f4dcaf0d6671 has been pushed to the review server.
It is available at http://review.typo3.org/3264

Actions #4

Updated by Philipp Gampe almost 13 years ago

Uncaught TYPO3 Exception
#1294587487: Forced charset not found: The forced character set "-1" was not found in t3lib/csconvtbl/ (More information)

RuntimeException thrown in file
/home/phil/t3-playground/t3-git/typo3/sysext/lang/lang.php in line 186.

2 language::init(NULL)

/home/phil/t3-playground/t3-git/typo3/init.php:
00419: 
00420: $GLOBALS['LANG'] = t3lib_div::makeInstance('language');
00421: $GLOBALS['LANG']->init($BE_USER->uc['lang']);
00422: 
00423: 

1 require("/home/phil/t3-playground/t3-git/typo3/init.php")

/home/phil/t3-playground/t3-git/typo3/index.php:
00036: 
00037: define('TYPO3_PROCEED_IF_NO_USER', 1);
00038: require('init.php');
00039: require('template.php');
00040: 
Actions #5

Updated by Patrick Rodacker almost 13 years ago

I wonder if it is the best way if we move the autoloader right after the inclusion of localconf.php or if it would be better to have all the logging / debugging stuff initialized before?

Actions #6

Updated by Benni Mack almost 13 years ago

Move the autoloader up... +1 for that.

Actions #7

Updated by Helmut Hummel almost 13 years ago

Moving the autoloader up is exactly what I did in #28099

Actions #8

Updated by Patrick Rodacker almost 13 years ago

Helmut, do you think there are any drawbacks initializing the whole debugging / logging thing after the autoloader? I am not sure atm.

Actions #9

Updated by Xavier Perseguers almost 13 years ago

  • Target version changed from 1281 to 4.6.0-beta1
Actions #10

Updated by Christian Kuhn almost 13 years ago

fixed by #28099 - thanks for duplicate work :/

Actions #11

Updated by Christian Kuhn almost 13 years ago

  • Status changed from New to Closed
Actions #12

Updated by Helmut Hummel almost 13 years ago

Sorry Christian, but we worked at the same time on it. I saw your solution after I already submitted mine.

Actions #13

Updated by Ernesto Baschny almost 11 years ago

  • Target version deleted (4.6.0-beta1)
Actions

Also available in: Atom PDF