Not Found (#404) Page not found.

Hi. I’m a beginner. I have a when to open CRUD or to create table fields at link address


404 not found.jpg

my table is WsbNewsCategory.

i have declared namespace backend\models;

Do you have this problem like this when installing yii 2

It’s not clear what you mean. Where does your WsbNewsCategory route point to in your url rules from your config? What does your controller look like? Try looking at some of the basic tutorials like to get a basic understanding of how Yii works.

Recently encountered similar problems.
Created models and CRUD with GII. Some Models worked fine but some models generated the Not Found (#404) when trying to request the CRUD views. Even with URL manager. I found out that Yii2 doesn’t like model names with multiple capitals in their name. e.g. I had a model called PProfs and the CRUD views were not found. When I changed the name to Pprofs and regenerated the CRUD view they could be found!
Couldn’t find it anywhere in Forum. So here it is!

The name of the model has nothing to do with the urls of the CRUD. It’s the name of the controller that matters in url management.

@StonePro What controller name did you have when CRUD for PProfs model didn’t work? Was it “PProfsController”? And what route did you try to access the CRUD with? It would not work with the url like "". You should have used "" instead.

Please check the following section of the Guide for route, controller ID and controller naming conventions.

Correct it used PProfsController.
So I now understand the problem was in the naming of the controller. Thanks.
(at least people can find the solution when they make they same mistake)

1 Like