I hope somebody to help me fixing this issue. I am using expressions to validate access in some controllers, until yesterday all worked fine, but yesterday I uploaded some changes and when I tried to access to admin panel of my website I got this error.
Fatal error: Class ‘User’ not found in /var/www/vhosts/mercatransporte.com/httpdocs/yii/framework/base/CComponent.php(616) : eval()'d code on line 1
In the accessRules function of the Controllers, I putted something like this:
Consider using a version system, like Mercurial. It’s really easy to create a repository (hg init) and then you will be able to watch the history, provided that you commit after each change.
In that case, maybe a diff between hosts will help?
Gustavo thanks for the reply. But I already had imported User class in the main.php. (‘application.modules.users.models.*’). I also tried by changing users for Users and still nothing.
I know that the problem is in the import, but I haven’t changed that import from the main, so I don’t know what happened there.
Jacmoe, could you post a link of Mercurial, I’m interested.
Mercurial comes bundled with the TortoiseHg install, but you might want to check it out.
One of the first things you want to do after creating your repository and making the first commit, is to ignore the assets and the protected/runtime directories.
In the commit dialog, right-click any of the offending directory entries, and choose ‘ignore’, then remove the filename bit from the path and add a star, then ‘Add’.
It should leave you with a .hgignore which looks like this: