Fatal error: Class 'COutputProcessor' not found in [path] #2021

Closed
christiansalazar opened this Issue Jan 21, 2013 · 7 comments

Projects

None yet

4 participants

@christiansalazar

Using Yii 12 or 13 this error is present when you create an event "onBeforeValidate()" event in a CActiveRecord and when the DEBUG flag is FALSE. to reproduce:

  1. Put the root file /index.php DEBUG flag to TRUE.
  2. declare an event in a CActiveRecord derived class in this way:
    case 2.1
    public function onBeforeValidate()
    OR case 2.2
    public function onBeforeValidate(CModelEvent $event)
    (both will produce the error)
  3. use the model in any view or controller, it says:
    Fatal error: Class 'COutputProcessor' not found in [path]
  4. NOW...Put the index.php DEBUG flag to FALSE....

5 the error changes to:
"Declaration of Docs::onBeforeValidate() should be compatible with CModel::onBeforeValidate($event)"

@cebe
Member
cebe commented Jan 22, 2013

"Declaration of Docs::onBeforeValidate() should be compatible with CModel::onBeforeValidate($event)"

This is a problem with your code. As the error states, you have to add $event parameter to Docs::onBeforeValidate().

Can you post a stack trace for Fatal error: Class 'COutputProcessor' not found in [path]?

@cebe cebe was assigned Jan 22, 2013
@christiansalazar

yes of course, but the problem is different than only a misplaced $event argument to be acomplished to the required declaration for onBeforeValidate.
the problem here is when this situation occurs and when the flag debug is false then another distinct error is displayed, not the same as when you put the debug flag to true,

@cebe
Member
cebe commented Jan 30, 2013

I am not sure what is going on in your code, but if you have error_reporing set dependant on YII_DEBUG the one or the other error might occur. Can you please post the stacktrace for COutputProcessor?

Can you post a stack trace for Fatal error: Class 'COutputProcessor' not found in [path]?

@christiansalazar

helo @cebe, please give me this weekend to review, i'll send a full feed back about. (i think it is possible that it is a php bug, not yii)

@samdark
Member
samdark commented May 27, 2013

@christiansalazar any news about it?

@cebe
Member
cebe commented Sep 4, 2013

Closed as no feedback given for 7 month.

@cebe cebe closed this Sep 4, 2013
@retuam
retuam commented Sep 4, 2013

Отправлено с моего HTC

----- Reply message -----
От: "Carsten Brandt" notifications@github.com
Кому: "yiisoft/yii" yii@noreply.github.com
Тема: [yii] Fatal error: Class 'COutputProcessor' not found in path
Дата: ср, сен 4, 2013 18:45
Closed as no feedback given for 7 month.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment