One error
There are configuration problems present which need to be fixed:
Try adding your current top level domain to the DebugKit.safeTld config and reload.
Where to find the file to config DebugKit
Furder
i read quickstart to start
i make al the files , database etc.
But got error messages like TemplatesController could not be found.
ControllerFactory.php etc.
This depends on what kind of top level domain you are using but lets say you use mycakephp.com you just add this at the end of your config/app_local.php
'DebugKit' => [
'safeTld' => ['com'],
],
Do you have a templates table in your database? Because a TemplatesController would be used to manage entries inside that table and would be located in src/Controller/TablesController.php
It would help if you tell us what kind of database structure/schema you are using and what kind of bin/cake bake all XYZ commands you have executed.
In general if you are new to CakePHP I would highly recommend you watch my CakePHP Tutorial series on youtube.
Generally, after installing cakephp, the easy way is to :
setup your database (with tables, schema, etc).
use the bin/cake bake command to auto-populate the files needed (Controller, Entity, Table, Templates)
Getting to your error. It means the file src/Controller/TemplatesController.php is present, but there is no method (also known as function & action) called articles. Try adding this function into the TemplatesController.php file
public function articles() {
// your content here
pr('I am articles method-action-function in TemplatesController');
}
You will also need to have a template file in templates/Templates/articles.php
Everything stated above can be easily done with the bin/cake bake mentioned by Kevin, but I am guessing you do not have command-line access to your server.
Well, it seems pretty clear that the new row you’re trying to insert has the same slug value as a row already in the database? You should have a unique validation for that if you’re going to have a database constraint about it.