When I upgrade cakephp from 1.3 to 2.0, I am getting below error. I am not using any plugins.
I tried to added CakePlugin::load('User');
and CakePlugin::loadAll(); in the bootstrap.php
file. But still getting same error.
Pleaes help.
Missing Plugin
Error: The application is trying to load a file from the User plugin
Error: Make sure your plugin User is in the app/Plugin directory and was loaded
<?php
CakePlugin::load('User');
Loading all plugins: If you wish to load all plugins at once, use the following line in your app/Config/bootstrap.php file
enter code here
CakePlugin::loadAll();
Notice: If you want to customize this error message, create app/View/Errors/missing_plugin.ctp Stack Trace
CORE/Cake/Core/App.php line 365 → CakePlugin::path(string)
CORE/Cake/Core/App.php line 226 → App::pluginPath(string)
CORE/Cake/Core/App.php line 547 → App::path(string, string)
[internal function] → App::load(string)
[internal function] → spl_autoload_call(string)
CORE/Cake/Utility/ClassRegistry.php line 145 → class_exists(string)
CORE/Cake/View/Helper/FormHelper.php line 163 → ClassRegistry::init(string, boolean)
CORE/Cake/View/Helper/FormHelper.php line 196 → FormHelper->_getModel(string)
CORE/Cake/View/Helper/FormHelper.php line 346 → FormHelper->_introspectModel(string, string)
APP/View/Users/profile.ctp line 49 → FormHelper->create(string, array)
CORE/Cake/View/View.php line 929 → include(string)
CORE/Cake/View/View.php line 891 → View->_evaluate(string, array)
CORE/Cake/View/View.php line 460 → View->_render(string)
CORE/Cake/Controller/Controller.php line 952 → View->render(null, null)
CORE/Cake/Routing/Dispatcher.php line 192 → Controller->render()
CORE/Cake/Routing/Dispatcher.php line 160 → Dispatcher->_invoke(UsersController, CakeRequest, CakeResponse)
APP/webroot/index.php line 108 → Dispatcher->dispatch(CakeRequest, CakeResponse)
Line number 49 if APP/View/Users/profile.ctp
<?php echo $this->Form->create("User.user_profile_data", array("action" => "/users/profile")); ?>
User Model
<?php
class User extends AppModel {
var $name = 'users';
var $hasMany = array('Group' =>
array(
'className' => 'Group',
'foreignKey' => 'user_id',
'dependent' => true,
));
function changeDataSource($newSource) {
parent::setDataSource($newSource);
parent::__construct();
}
function validateLogin($data) {
$user = $this->find('first', array('conditions' => array('username' => $data['User']['username'], 'password' => $data['User']['password'], 'status' => 'A')));
if (empty($user) == false)
return $user;
return false;
}
}
?>
APP/View/Users/profile.ctp
around line 49? – user221931User
model. – user221931