Missing Load plugin

╄→尐↘猪︶ㄣ 提交于 2019-11-30 09:49:07

问题


After I change some of the code from 1.3 to 2.1. Some error occur. This is the error:

Missing Plugin
Error: The application is trying to load a file from the forums plugin
Error: Make sure your plugin forums is in the app\Plugin directory and was loaded

<?php
CakePlugin::load('forums');

Loading all plugins: If you wish to load all plugins at once, use the following line in your app\Config\bootstrap.php file

CakePlugin::loadAll();
Notice: If you want to customize this error message, create app\View\Errors\missing_plugin.ctp.

Somebody, please help me?


回答1:


Write the following line in your app\Config\bootstrap.php file

CakePlugin::loadAll(array('Forums',
   array('bootstrap' => true, 'routes' => true),
));



回答2:


I was also facing the same problem in cake 2+. The problem in this was

 CakePlugin::load( 'DebugKit');

was already added in bootstrap.php file and when I added this line

CakePlugin::load( 'Cooltheme');

The first was loaded and second was omitted. So to solve this problem I simply removed second one and modified the first one as below

CakePlugin::load( array('DebugKit','Cooltheme'));

Then it works for me, may be heplfull to others.



来源:https://stackoverflow.com/questions/9661218/missing-load-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!