S
S
Sergey Zolotarev2021-09-08 09:01:19
Yii
Sergey Zolotarev, 2021-09-08 09:01:19

How to fix 404 error if I store views in separate folders in Yii2?

Good morning!
Since yesterday, I have been facing a solution to a 404 error, which is described as follows:
13115892-231823c2295cbc43a5801bb4b530dc5e.png? X-Amz-Algorithm = AWS4-HMAC-SHA256 & X-Amz-Credential = AKIAJSCJQ2NM3XLFPVKA% 2F20210908% 2Fus-east-1% 2Fs3% 2Faws4_request & X-Amz-Date = 20210908T054912Z & X-Amz-Expires = 28800 & X-Amz- SignedHeaders=host&X-Amz-Signature=47abf6c60c65e425a7555bd2bc305124b5910b920927ada0252e122038280038
The problem is that when I store views in separate folders and correctly describe access parameters in controller actions, Yii2 considered this a big mistake.
And not only in one controller, but in front of you is the structure of the views folder of my Yii2 project (the site folder is where the views are stored:

├── layouts
│ ├── main.php
│ └── service.php
└── site
├── index .php
├── news
│ ├── index.php
│ └── view.php
├── objects
│ ├── index.php
│ ├── object.php
│ └── view.php
└── passport
├── cart.php
├── offers.php
├── page.php
├── profile.php
└── services.php

The code example of one of the controllers where I encountered this problem will be in the comments to this question and how to properly distribute views?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question