M
M
Maxim Timofeev2016-11-04 13:14:10
Yii
Maxim Timofeev, 2016-11-04 13:14:10

Why did the classes stop working?

At some point, all models stopped working.

PHP Fatal Error – yii\base\ErrorException
Class 'common\models\LoginForm' not found

although the class was not touched at all and this is the situation with other models. It reaches the controller action (if you disable autologin, otherwise it swears even earlier for the lack of common/models/User) and there
public function actionIndex(){
        $bbb = Controller::className();
       return $bbb;
    }

no problem
here
public function actionIndex(){
        $bbb = User::className();
       return $bbb;
    }

mistake. And any model. I have no idea what could be the issue. At some point, everything fell apart. Where to dig?
I found out by typing that only common / models does not work, everything else is without problems, so I simply renamed the folder to common / model without "s". I write off for server monthly. The server is not mine, it's not enough to dig into the rights, so that he would live for a long time.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaliy Orlov, 2016-11-04
@orlov0562

look at which path the autoloader is looking for the file and make sure that it is there the
autoloader is located in the vendor/yiisoft/yii2/BaseYii.php file, the autoload method

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question