This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Doctrine_Template_* classes are not found in model

Ask help about existing plugins, or find advice about the way to build up your own.

Doctrine_Template_* classes are not found in model

by jstuardo » Sat Jan 28, 2012 11:42 pm

Hello...

I have enabled some behaviours in my Symfony 1.4 application.

The problem is that I don't know why the Doctrine_Template_* classes are not included so that PHP cannot access them.

For example, this has the setUp method of the model class:

Code: Select all
        $sortable0 = new Doctrine_Template_Sortable();
        $softdelete0 = new Doctrine_Template_SoftDelete();
        $timestampable0 = new Doctrine_Template_Timestampable();
        $signable0 = new Doctrine_Template_Signable();


When I run the application, I got this error:

Fatal error: Class 'Doctrine_Template_Sortable' not found

When I did not have the Sortable behaviour enabled, the error was about Doctrine_Template_Signable class.

Any help will be greatly appreciated

Thanks
Jaime
Symfony 1.4 and 2
jstuardo
Member
 
Posts: 90
Joined: Mon May 03, 2010 3:50 am
Location: Santiago

Re: Doctrine_Template_* classes are not found in model

by jstuardo » Sun Jan 29, 2012 4:24 am

Never mind...

for some reason, this code was added in backendConfiguration.class.php:

Code: Select all
    public function setup() {
        $this->enablePlugins(array('sfDoctrinePlugin', 'sfDoctrineGuardPlugin'));
    }


This was bypassing what I was defined in ProjectConfiguration.class.php.

I removed that setup method and it works now.

Cheers
Jaime
Symfony 1.4 and 2
jstuardo
Member
 
Posts: 90
Joined: Mon May 03, 2010 3:50 am
Location: Santiago