Answer the question
In order to leave comments, you need to log in
Why might this error occur? How to run remote yii application locally?
Good afternoon. I'm completely new to yii, I'm trying to launch a site on my openserver from a remote server.
I downloaded all the files, filled in the database, went through the absolute paths with autocorrect, entered the data from the database.
At the root of the site, I got the following structure. To start, I go to site.loc/public
and see an error:
CException
Контроллер SiteController не может найти представление "error".
Answer the question
In order to leave comments, you need to log in
The problem with views can be in several cases:
1. The rendering path is incorrect. If you transferred only folders, then you also need to set up viewPath
2. If you set up viewPath and still have problems, the problem is the path is correct. Either the full path was not specified, or the case of letters was not respected.
Most likely the first way.
Own way. Application settings might look like this:
return [
'viewPath' => '@app/modules/users/views/frontend',
];
return [
'components' => [
'view' => [
'theme' => [
'basePath' => '@app/themes/basic',
'baseUrl' => '@web/themes/basic',
'pathMap' => [
'@app/views' => '@app/themes/basic',
],
],
],
],
];
return [
'modules' => [
'users' => [
'class' => app\modules\users\Module::class,
'controllerNamespace' => 'app\modules\users\controllers\frontend',
'viewPath' => '@app/modules/users/views/frontend',
'layout' => '@app/views/layouts/column2-right.php',
],
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question