I have this error,
“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
class ContactsController extends AppController
public function index()
nobody know why this happen ? … thanks
Case matters. Does the path really have BASIC in it instead of Basic?
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.
I created the file using touch unix command.
I used the path suggested by the exception as command parameter.
Everything works …
- templates override works
- routes works
- cake reveal i’m in the plugin so the path suggested by the exception is right!
Exception Attributes: array (
‘class’ => ‘Contacts’,
‘plugin’ => ‘Custom/Basic’,
‘prefix’ => false,
‘_ext’ => false,
Seams even if i have the file with the right path for cake this doesn’t exists.
-rwxrwxrwx 1 myuser mygroup 157B 15 Dic 18:18 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) :
My solution (PATH)
My folder name “in /plugins” is structure is
custom (parent folder)
- OTHER FOLDERS
In My Application.php
MY CAKE PLUGIN COMMAND OUTPUT
bin/cake plugin loaded
This is my debug output.
Everything you’re posting here would indicate that it does not, in fact, work. But maybe someone else will be able to help you.