I've created a module with a custom Plugin ("group_user"). It all worked great until I modified the code and accidentally introduced an error. This resulted in a WSOD Drupal\Component\Plugin\Exception\PluginNotFoundException</em>: The "group_user" plugin does not exist. I cannot even uninstall the custom module since either drush or the WSOD show the same error. Even undoing the code changes in the code do not work. I've found this bug description which is discussed in the following issue. There does not seem to be a working solution yet. Is there any way I could manually "remove" the plugin or find the "location" it is still loaded?


Plugin definition its a tandem between the plugin manager wich defines how your plugin type should be discovered and instantiated; and the plugin definition method itself that could be either using YAML files or annotations. Depending of which you used to define you new plugin type is how you must proceed in order Drupal find your plugin implementation. Said that if your plugin is used in a configuration entity you can find it querying your configuration table as follows:

SELECT * FROM config WHERE name LIKE '%group_user%' OR data LIKE '%group_user%';

In the other hand if your plugin is invoked directly in code by calling the plugin manager method createInstance you can then find where it is being used with a simple search in your custom code using your favorite editor or IDE. I emphasize on custom code as is a custom plugin type cannot be (yet) in contrib code.


Is there any way I could manually "remove" the plugin or find the "location" it is still loaded?

The first step to find the "location" is to find the code trying to load the plugin. If you don't have an IDE with xdebug you can try to find it in a backtrace. Since you can't reach the admin UI anymore, add this line to settings.php:

$config['system.logging']['error_level'] = 'verbose';

I don't think the linked issue is connected, because it is about what happens after uninstalling a module containing a specific plugin type. You didn't even uninstall the module, you've tried this only after the error occured, which then is no longer possible because of the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.