Fatal error: Call to undefined method ::model()

Can anyone shed any light on why I might be getting this error:

Fatal error: Call to undefined method News::model()

News appears to be properly defined and the model method is defined within News as well. I even tried copying another working class and renaming it to News, but I still get the same error.

Thanks.

[font="Times New Roman"] [/font]

Maybe you have two News classes in your application and one of them doesn’t extend CActiveRecord? One of them can be a widget, for example. Just a guess :)

Brilliant! Thanks andy_s that was what it was. I had a widget with the same name that was causing the problem. I have been pulling my hair out with this for a while now.