Bug #28098

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

Added by Patrick Rodacker over 9 years ago. Updated over 7 years ago.

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

0%

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

Related to TYPO3 Core - Bug #30827: t3lib_utility_VersionNumber is not found after trying to upgrade Rejected 2011-10-12
Duplicated by TYPO3 Core - Bug #28099: Fatal error if setDBinit not set in localconf.php Closed 2011-07-12

History

#1 Updated by Christian Kuhn over 9 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.

#2 Updated by Philipp Gampe over 9 years ago

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

#3 Updated by Mr. Hudson over 9 years ago

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

#4 Updated by Philipp Gampe over 9 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: 

#5 Updated by Patrick Rodacker over 9 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?

#6 Updated by Benni Mack over 9 years ago

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

#7 Updated by Helmut Hummel over 9 years ago

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

#8 Updated by Patrick Rodacker over 9 years ago

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

#9 Updated by Xavier Perseguers over 9 years ago

  • Target version changed from 1281 to 4.6.0-beta1

#10 Updated by Christian Kuhn over 9 years ago

fixed by #28099 - thanks for duplicate work :/

#11 Updated by Christian Kuhn over 9 years ago

  • Status changed from New to Closed

#12 Updated by Helmut Hummel over 9 years ago

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

#13 Updated by Ernesto Baschny over 7 years ago

  • Target version deleted (4.6.0-beta1)

Also available in: Atom PDF