cakephp - Cake PHP 3 plugin's controller not visible -


i moved working plugin /plugins/pluginname directory /vendor/myname/pluginname

url on call plugin controller

http://domain.local/pluginname/index

before moving first directory another, plugin working expected. moved plugin new directory make reusable other cake php apps.

plugin installed composer.

why have message

"error: controller class index not found.". controllers plugin not visible on app, throws same error. error thrown line 79 file \vendor\cakephp\cakephp\src\routing\dispatcher.php

in main bootstrap.php file put line:

plugin::load('myname/pluginname', ['bootstrap' => false, 'routes' => true]);

why plugin in vendor directory not working in case?

cakephp3_controller_not_found_error

if plugin installed composer, not move it.

whether installed @ plugin or vendor folder determined author of plugin.

if need load plugin in bootstrap, use

plugin::load('pluginname', ['bootstrap' => false, 'routes' => true]); 

see http://book.cakephp.org/3.0/en/plugins.html#plugin-configuration

it work regardless if composer places in vendor or plugins folder.

most importantly, leave in folder author intended in.

lastly, check plugin suitable cakephp 3.x

as url, should expect use /plugin-name/controller/action

see http://book.cakephp.org/3.0/en/plugins.html#plugin-controllers , quote

if want access we’ve got going far, visit /contact-manager/contacts


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -