Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

christiansalazar opened this issue Jan 21, 2013 · 7 comments
Assignees

Comments

@christiansalazar
Copy link

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
Copy link
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]?

@ghost ghost assigned cebe Jan 22, 2013
@christiansalazar
Copy link
Author

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
Copy link
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
Copy link
Author

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
Copy link
Member

samdark commented May 27, 2013

@christiansalazar any news about it?

@cebe
Copy link
Member

cebe commented Sep 4, 2013

Closed as no feedback given for 7 month.

@cebe cebe closed this as completed Sep 4, 2013
@retuam
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants