[TYPO3-core] RFC: Bug #8260: Update Wizard in install tool force temp-configuration files and load configuration twice

Oliver Hader oliver at typo3.org
Fri Sep 3 15:56:59 CEST 2010


This is a SVN patch request.

Type: Bugfix

Bugtracker references:
http://bugs.typo3.org/view.php?id=8260

Branches: TYPO3_4-2, TYPO3_4-3, TYPO3_4-4, Trunk

Problem:
Imagine the situation that you have an extension installed that defines
PHP classes or includes class files in ext_localconf.php or ext_tables.php.
If you now try to update a TYPO3 installation by running the update
wizard in the install tool, you'll run into a PHP fatal error like:
"PHP Fatal error: Cannot redeclare class tx_whatever_xyz"
The reason is that the update wizard removes existing temp_CACHED_*.php
files, regenerates them and loads them another time just to make sure
that the uncached versions of ext_localconf.php and ext_tables.php are
used. The result is, that PHP classes will be defined twice with causes
the accordant PHP fatal error.

Solution:
Whenever the install tool is used, the ext_localconf.php and
ext_tables.php files must not be taken from the cached files - this is
done by listening for the constant "TYPO3_enterInstallScript".
Besides that the cached files still must be removed when using the
update wizard since it could happen that new extensions will be
installed and caches need to be cleared.

Notes:
You can test the behaviour the attached extension that includes a PHP
class file in ext_localconf.php. Add the following to your localconf.php
file (or set it by using the install tool):
$TYPO3_CONF_VARS['EXT']['extCache'] = 0;

Without having the patches applied, you should get the PHP fatal error
when using the update wizard in the install tool.

olly
-- 
Oliver Hader
TYPO3 v4 Core Team Leader
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008260_4-2.patch
Type: text/x-patch
Size: 6284 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100903/7f08afe0/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008260_4-3.patch
Type: text/x-patch
Size: 7037 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100903/7f08afe0/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008260_4-4.patch
Type: text/x-patch
Size: 7005 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100903/7f08afe0/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008260_trunk.patch
Type: text/x-patch
Size: 7002 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100903/7f08afe0/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: T3X_bug_8260-0_0_0-z-201009011651.t3x
Type: application/octet-stream
Size: 1391 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100903/7f08afe0/attachment-0001.obj>


More information about the TYPO3-team-core mailing list