Error when loading plugins

Hello everybody and happy new year !

I am having problems while trying to load plugins.

I get this message :

Error: The application is trying to load a file from the Medias plugin.

Make sure your plugin Medias is in the /www/cake-update/plugins/ directory and was loaded.

Medias plugin is in the right place.
Application file is :
/**
* @return void
*/
protected function bootstrapCli()
{
try {
$this->addPlugin(‘Bake’);
} catch (MissingPluginException $e) {
// Do not halt if the plugin is missing
}

    parent::bootstrap();

    $this->addPlugin('Migrations');

    // Load more plugins here
    $this->addPlugin('Medias');
} 

Code was generated with bake.

So, I really do not know what to do.

I have been working with cakephp since 1.3 and I really have a lot of problems with 3.9.
Did not have so many until 3.3.

Does your plugin have a properly configured composer.json, and did you run composer dump-autoload after creating it?

I tried but got :
Action required!

 The CakePHP plugin installer v1.3+ no longer requires the                  
 "post-autoload-dump" hook. Please update your app's composer.json          
 file and remove usage of                                                   
 Cake\Composer\Installer\PluginInstaller::postAutoloadDump

Issues related to the plugin installer and compatibility with Composer 2.x are well documented. I haven’t done that upgrade myself yet, so I’m not sure if there’s more to it than the thing specified in the error message.

1 Like