# Error when loading plugins

**URL:** <https://discourse.cakephp.org/t/error-when-loading-plugins/8814>\
**Category:** Plugins\
**Created:** [January 3, 2021, 3:43pm UTC](https://discourse.cakephp.org/t/error-when-loading-plugins/8814 "2021-01-03T15:43:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![6120](https://avatars.discourse-cdn.com/v4/letter/6/278dde/32.png) [@6120](https://discourse.cakephp.org/u/6120)\
**Post date:** [January 3, 2021, 3:43pm UTC](https://discourse.cakephp.org/t/error-when-loading-plugins/8814/1 "2021-01-03T15:43:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [January 3, 2021, 7:40pm UTC](https://discourse.cakephp.org/t/error-when-loading-plugins/8814/2 "2021-01-03T19:40:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![6120](https://avatars.discourse-cdn.com/v4/letter/6/278dde/32.png) [@6120](https://discourse.cakephp.org/u/6120)\
**Post date:** [January 4, 2021, 10:15am UTC](https://discourse.cakephp.org/t/error-when-loading-plugins/8814/3 "2021-01-04T10:15:22Z")

</div>

> [@Zuluru](#):
>
> composer dump-autoload

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

```

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [January 4, 2021, 2:31pm UTC](https://discourse.cakephp.org/t/error-when-loading-plugins/8814/4 "2021-01-04T14:31:32Z")

</div>

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.
