1

I did a fresh installation of CakePHP 3.1. Then I baked a plugin. Then I baked a plugin controller.

Done as per the example in the documentation: http://book.cakephp.org/3.0/en/plugins.html#creating-your-own-plugins

But when I go to /cake-cms/cake-cms I get a Missing Controller error.

Error: Create the class CakeCmsController below in file: src\Controller\CakeCmsController.php

The baked code all looks fine to me. The baked plugin routes.php is being executed (I tested with exit;). The baked controller exists in: /plugins/CakeCms/src/Controller/CakeCmsController.php but CakePHP is not looking there.

The example in the documentation says it should just work.

  • Where in the docs does it say that this would work? – ndm Oct 23 '15 at 11:28
  • http://book.cakephp.org/3.0/en/plugins.html#creating-a-plugin-using-bake and http://book.cakephp.org/3.0/en/plugins.html#plugin-controllers "If you want to access what we’ve got going thus far, visit /contact-manager/contacts" – Test Testington Oct 23 '15 at 12:29
  • 1
    Ok, but you can see that this URL is a little different, right? `contact-manager` is the plugin, and `contacts` is the controller. Your URL contains just one of those two. – ndm Oct 23 '15 at 15:01
  • That's a good point, however I get the same error on /cake-cms/cake-cms – Test Testington Oct 23 '15 at 17:58

1 Answers1

1

Ok, it looks like my problem was that my plugin had the same name as my project (cakecms). When I make a plugin with a different name then it works.