# Create a plugin, but it's not showing up under the "Settings -\> Plugins" section in Mautic

**URL:** <https://forum.mautic.org/t/create-a-plugin-but-its-not-showing-up-under-the-settings-plugins-section-in-mautic/33522>\
**Category:** Development\
**Tags:** community, development\
**Created:** [September 18, 2024, 6:52am UTC](https://forum.mautic.org/t/create-a-plugin-but-its-not-showing-up-under-the-settings-plugins-section-in-mautic/33522 "2024-09-18T06:52:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![prince\_kumar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/prince_kumar/32/13384_2.png) [@prince\_kumar](https://forum.mautic.org/u/prince_kumar)\
**Post date:** [September 18, 2024, 6:52am UTC](https://forum.mautic.org/t/create-a-plugin-but-its-not-showing-up-under-the-settings-plugins-section-in-mautic/33522/1 "2024-09-18T06:52:55Z")

</div>

**Your software**  
My Mautic version is: 5.1.0  
My PHP version is: 8.2.23  
My Database type and version: MySQL 8.2.23

**Your problem**  
I’m trying to create a plugin, but it’s not showing up under the “Settings → Plugins” section in Mautic.

**Sample Code of the Plugin:**

1. Created a folder inside `plugins/DemoTestBundle`
2. `Config/config.php`:

```auto
return [
    'name' => 'Si Demo',
    'description' => 'Team demo creating a bootstrapped plugin',
    'version' => '1.0',
    'author' => 'Team demo'
];

```

1. `composer.json`:

```auto
{
        "name": "mautic/demotestbundle",
        "description": "A plugin to build DB connections in Mautic.",
        "type": "mautic-plugin",
        "autoload": {
            "psr-4": {
                "MauticPlugin\\DemoTestBundle\\": "plugins/DemoTestBundle"
            }
        }
    }

```

1. `DemoTestBundle.php`:

```auto
namespace MauticPlugin\DemoTestBundle;
use Mautic\PluginBundle\Bundle\PluginBundleBase;
class DemoTestBundle extends PluginBundleBase
{
    // Nothing more required
}

```

**Steps I Have Tried to Fix the Problem:**

1. Cleared the cache in `var/cache/prod/`
2. Executed `composer dump-autoload`
3. Cleared the cache using `php bin/console cache:clear`
4. click on `Install / Upgrade Plugins` button at right corner in UI setting → plugin  
check log we got a error

```auto
[2024-09-18T05:43:28.008033+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: "Mautic\PluginBundle\Event\PluginUpdateEvent::__construct(): Argument #2 ($oldVersion) must be of type string, null given, called in /var/www/html/app/bundles/PluginBundle/Helper/ReloadHelper.php on line 83" at /var/www/html/app/bundles/PluginBundle/Event/PluginUpdateEvent.php line 12 {"exception":"[object] (TypeError(code: 0): Mautic\\PluginBundle\\Event\\PluginUpdateEvent::__construct(): Argument #2 ($oldVersion) must be of type string, null given, called in /var/www/html/app/bundles/PluginBundle/Helper/ReloadHelper.php on line 83 at /var/www/html/app/bundles/PluginBundle/Event/PluginUpdateEvent.php:12)
[stacktrace]
#0 /var/www/html/app/bundles/PluginBundle/Helper/ReloadHelper.php(83): Mautic\\PluginBundle\\Event\\PluginUpdateEvent->__construct()
#1 /var/www/html/app/bundles/PluginBundle/Facade/ReloadFacade.php(35): Mautic\\PluginBundle\\Helper\\ReloadHelper->updatePlugins()
#2 /var/www/html/app/bundles/PluginBundle/Controller/PluginController.php(415): Mautic\\PluginBundle\\Facade\\ReloadFacade->reloadPlugins()
#3 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(163): Mautic\\PluginBundle\\Controller\\PluginController->reloadAction()
#4 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(75): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()
#5 /var/www/html/vendor/symfony/http-kernel/Kernel.php(202): Symfony\\Component\\HttpKernel\\HttpKernel->handle()
#6 /var/www/html/app/AppKernel.php(109): Symfony\\Component\\HttpKernel\\Kernel->handle()
#7 /var/www/html/app/middlewares/CORSMiddleware.php(76): AppKernel->handle()
#8 /var/www/html/app/middlewares/HSTSMiddleware.php(39): Mautic\\Middleware\\CORSMiddleware->handle()
#9 /var/www/html/app/middlewares/CatchExceptionMiddleware.php(28): Mautic\\Middleware\\HSTSMiddleware->handle()
#10 /var/www/html/app/middlewares/VersionCheckMiddleware.php(58): Mautic\\Middleware\\CatchExceptionMiddleware->handle()
#11 /var/www/html/app/middlewares/TrustMiddleware.php(42): Mautic\\Middleware\\VersionCheckMiddleware->handle()
#12 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\\Middleware\\TrustMiddleware->handle()
#13 /var/www/html/index.php(18): Stack\\StackedHttpKernel->handle()
#14 {main}
"}
[2024-09-18T05:44:21.587888+00:00] mautic.WARNING: PHP Warning - Undefined array key "path" - in file /var/www/html/app/bundles/CoreBundle/Controller/ExceptionController.php - at line 108 

```

Any hints on what might be going wrong?

Kind regards,  
Prince Patel

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 18, 2024, 7:12am UTC](https://forum.mautic.org/t/create-a-plugin-but-its-not-showing-up-under-the-settings-plugins-section-in-mautic/33522/2 "2024-09-18T07:12:56Z")

</div>

Interesting. Can you share your plugin as a Github repo? I’d like to easily replicate this issue. It looks like an issue in Mautic itself.

---

<div class="post-metadata">

**Author:** ![prince\_kumar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/prince_kumar/32/13384_2.png) [@prince\_kumar](https://forum.mautic.org/u/prince_kumar)\
**Post date:** [September 18, 2024, 8:35am UTC](https://forum.mautic.org/t/create-a-plugin-but-its-not-showing-up-under-the-settings-plugins-section-in-mautic/33522/3 "2024-09-18T08:35:53Z")

</div>

we just created manually folder

1. Created a folder inside plugins/DemoTestBundle
2. DemoTestBundle/Config/config.php
3. DemoTestBundle/composer.json
4. DemoTestBundle/DemoTestBundle.json

---

<div class="post-metadata">

**Author:** ![markusvjh](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@markusvjh](https://forum.mautic.org/u/markusvjh)\
**Post date:** [September 18, 2024, 9:38am UTC](https://forum.mautic.org/t/create-a-plugin-but-its-not-showing-up-under-the-settings-plugins-section-in-mautic/33522/4 "2024-09-18T09:38:07Z")

</div>

Hmm, I don’t see this ‘autoload’ being used in other plugins. I would test removing this part, or test not having composer.json altogether if its not needed, to see if that helps.

```auto
{
        "name": "mautic/demotestbundle",
        "description": "A plugin to build DB connections in Mautic.",
        "type": "mautic-plugin",
    }

```

---

<div class="post-metadata">

**Author:** ![prince\_kumar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/prince_kumar/32/13384_2.png) [@prince\_kumar](https://forum.mautic.org/u/prince_kumar)\
**Post date:** [September 18, 2024, 11:08am UTC](https://forum.mautic.org/t/create-a-plugin-but-its-not-showing-up-under-the-settings-plugins-section-in-mautic/33522/5 "2024-09-18T11:08:02Z")

</div>

yes resolved we removed composer.json

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [September 19, 2024, 11:09pm UTC](https://forum.mautic.org/t/create-a-plugin-but-its-not-showing-up-under-the-settings-plugins-section-in-mautic/33522/6 "2024-09-19T23:09:02Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
