[TYPO3-english] Typo3 6.2. WEC Site Config
Jigal van Hemert
jigal.van.hemert at typo3.org
Sat May 7 22:49:20 CEST 2016
Hi,
On 07/05/2016 20:42, Wiesław Golsz wrote:
> This time much more serious error. I use an application developed by
> WEC. It is widely used in the network, but WEC support no longer exists.
>
> It is very important ext "/WEC Site Config/" Site-wide configuration
> module for constants, templates, and add-on features.
> https://typo3.org/extensions/repository/view/wec_config
>
> I get this error:
>
> /Fatal error: require_once() [function.require]: Failed opening required
> 'PATH_t3libclass.t3lib_extobjbase.php'
> (include_path='/home/www/6.bestchoicefx.com/typo3/contrib/pear/:.:/usr/local/php5.3/lib//php')
> in
> /home/www/6.bestchoicefx.com/typo3conf/ext/wec_config/features/class.tx_wecconfig_features.php
> on line 31/
Most of the time these errors are not hard to fix, although it can take
some time if you encounter a lot of them each time you fix one.
In TYPO3 4.3 (if I remember correctly) a mechanism was introduced to
automatically load classes in PHP. This meant that you didn't need to
use lines like
require_once( PATH_t3libclass . 't3lib_extobjbase.php');
in your code. You could just use the class and it would automatically be
loaded.
Many extension authors still kept those lines because the code still
worked. In 6.x the autoloader was changed and these errors appeared if
extension code still used those unnecessary lines.
> Q3. How to fix this error
Look carefully at the error! It says that the require_once didn't work
in ....../ext/wec_config/features/class.tx_wecconfig_features.php on
line 31.
Edit the file and put two slashes in front of the 'require_once' on the
mentioned line. This turns the rest of the line into a comment and it
will no longer be executed. It will look a bit like:
//require_once( PATH_t3libclass . 't3lib_extobjbase.php');
(I don't know the exact line, but you get the idea)
Warning for the future:
- in 6.x all class names in the core were changed; the names are now
easier to read
- 6.2 still knows the old names like the existed in 4.5 and extensions
can still use the old names
- 7.6 doesn't know the old names anymore, but there is an extension
'compatibility6' which makes it possible to still use the old class
names; it comes with a price, performance is a lot worse with that
extension installed
- 8.x don't know the old names and there is no extension that adds
support for those old class names
You can use a lot of 4.x compatible extensions with 6.2, but it would be
wise to look for alternatives before upgrading to 7 LTS or 8.x.
Alternative would be to edit the extensions and replace all the old
class names with the new names. In some cases more code needs to be
replaced, but you could hire a TYPO3 programmer to make those changes.
--
Jigal van Hemert
TYPO3 CMS Active Contributor
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-english
mailing list