[eZ Publish 4.0.0beta1] Add extension

Author Message

Alain Sahli

Friday 23 November 2007 8:07:30 am

Hi all!

I would add a new extension and the following error appears :

Fatal error: Class 'ezcFile' not found in /home/www/wess.ch/lib/ezutils/classes/ezautoloadgenerator.php on line 283
Fatal error: eZ Publish did not finish its request

The execution of eZ Publish was abruptly ended, the debug output is present below.

I found this bug in the Issue Tracker here : http://issues.ez.no/IssueView.php?Id=12008&activeItem=14

And the solution is:

Do you have eZ Components Base and File component installed? This is a requirement for eZ Publish 4 now.

But I don't know how to install eZ Components Base and File in eZ Publish!

Can somebody help me ?

http://www.wess.ch
eZ Publish Certified developer : http://auth.ez.no/certification/verify/272583

Kristof Coomans

Friday 23 November 2007 8:50:51 am

Hi Alain

For installation of eZ Components, please consult the documentation at the eZ Components website: http://ezcomponents.org/docs/install

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Alain Sahli

Friday 23 November 2007 9:06:44 am

Ok thanks, it works ;-)

http://www.wess.ch
eZ Publish Certified developer : http://auth.ez.no/certification/verify/272583

Piotrek Karaƛ

Saturday 24 November 2007 1:17:40 am

eZ Publish 4 seems to have a eZcomponents-dedicated autoload built in. When I tried the autoload declaration:

require_once "ezc/Base/base.php";
function __autoload( $className )
{ 
	ezcBase::autoload( $className ); 
}

I got an error, because __autoload function had already been there, in /autoload.php:

(...)
$baseEnabled = @include( 'ezc/Base/base.php' );
if ( !$baseEnabled )
{
    $baseEnabled = @include( 'Base/src/base.php' );
}

define( 'EZCBASE_ENABLED', $baseEnabled );

function __autoload( $className )
{
    static $ezpClasses = null;
    if ( is_null( $ezpClasses ) )
    {
        $ezpKernelClasses = require 'autoload/ezp_kernel.php';
        $ezpExtensionClasses = require 'autoload/ezp_extension.php';
        $ezpClasses = array_merge( $ezpKernelClasses, $ezpExtensionClasses );
    }

    if ( array_key_exists( $className, $ezpClasses ) )
    {
        require( $ezpClasses[$className] );
    }
    elseif ( EZCBASE_ENABLED )
    {
        ezcBase::autoload( $className );
    }
}

In result, no additional declaration in extension was required. Nice.

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.