“In the case you tried to access a plugin controller make sure you added it to your composer file or you use the autoload option for the plugin.”
Error: Create the class ContactsController below in file: /…/( some PATH) /BASIC/src/Controller/ContactsController.php
Inside ContactsController.php i have those lines!!! FILE EXISTS … and chmod is 777
namespace Custom\Basic\Controller;
use Custom\Basic\Controller\AppController;
class ContactsController extends AppController
{
public function index()
{
//...
}
}
Also, is “Custom” part of that path? That seems, well, custom, and I’m not sure whether that sort of structure (putting your src folder two levels down) is supported.
Seams even if i have the file with the right path for cake this doesn’t exists.
/MyUSERDIR/MYPROJECTDIR/plugin/custom/BASIC/src/Controller/ContactsController.php
I would expect the path for this to be /MyUSERDIR/MYPROJECTDIR/plugin/Custom/Basic/src/Controller/ContactsController.php. Note the changes in the case of Custom and Basic. That’s assuming that it’s even possible to call your plugin “Custom/Basic”, which I haven’t ever seen before.
Maybe isn’t a good solution you right but seams it works.
Your expectation (PATH) :
/plugins/Custom/Basic/src/Controller/ContactsController.php
My solution (PATH)
/plugins/custom/BASIC/src/Controller/ContactsController.php
My folder name “in /plugins” is structure is
custom (parent folder)
- BASIC
- OTHER FOLDERS
In My Application.php $this->addPlugin('Custom/BASIC');